Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Consider making the build triple a top level directory in a rustpkg workspace #11289

Closed
SiegeLord opened this issue Jan 3, 2014 · 1 comment

Comments

@SiegeLord
Copy link
Contributor

This would let non-rustpkg tools have an easier time installing artifacts into a rustpkg workspace just by setting the installation prefix and not changing all the installation directories manually. E.g. in an Autoconf or CMake based system you'd simply do:

./configure --exec-prefix rustpkg_workspace/<build_triple>
cmake -DCMAKE_INSTALL_PREFIX=rustpkg_workspace/<build_triple>

Right now you'd have to do something like this instead:

./configure --bindir rustpkg_workspace/bin/<build_triple> --libdir rustpkg_workspace/lib/<build_triple>
# CMake doesn't have an option to do this by default

Which is somewhat less convenient. There's still a question of where to obtain a rustc compatible target triple, but it's a separate issue.

Along the same lines, the default rustc search path could be modified to look for <build_triple>/lib instead of lib/<build_triple>.

@emberian
Copy link
Member

rustpkg is gone, not sure this is an issue with cargo. if it is, a new issue should be reopened on rust-lang/cargo

flip1995 pushed a commit to flip1995/rust that referenced this issue Aug 14, 2023
 [iter_overeager_cloned]: detect `.cloned().filter()` and `.cloned().find()`

changelog: [`iter_overeager_cloned`]: detect `.cloned().filter()` and `.cloned().find()`

Key idea:
```
// before
iter.cloned().filter(|x| unimplemented!() )
// after
iter.filter(|&x| unimplemented!() ).cloned()

// before
iter.cloned().filter( foo )
// after
// notice `iter` must be `Iterator<Item= &T>` (callee of `cloned()`)
// so the parameter in the closure of `filter` must be `&&T`
// so the deref is safe
iter.filter(|&x| foo(x) ).cloned()
```
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants