Skip to content

rustpkg: Handle local git repositories - #7681

Closed
catamorphism wants to merge 1 commit into
rust-lang:masterfrom
catamorphism:rustpkg-local-repos
Closed

rustpkg: Handle local git repositories#7681
catamorphism wants to merge 1 commit into
rust-lang:masterfrom
catamorphism:rustpkg-local-repos

Conversation

@catamorphism

Copy link
Copy Markdown
Contributor

r? @graydon rustpkg can now build code from a local git repository. In the
case where the local repo is in a directory not in the RUST_PATH,
it checks out the repository into a directory in the first workspace
in the RUST_PATH.

The tests no longer try to connect to github.com, which should
solve some of the sporadic failures we've been seeing.

rustpkg can now build code from a local git repository. In the
case where the local repo is in a directory not in the RUST_PATH,
it checks out the repository into a directory in the first workspace
in the RUST_PATH.
The tests no longer try to connect to github.com, which should
solve some of the sporadic failures we've been seeing.
bors added a commit that referenced this pull request Jul 15, 2013
…rphism
r? @graydon rustpkg can now build code from a local git repository. In the
case where the local repo is in a directory not in the RUST_PATH,
it checks out the repository into a directory in the first workspace
in the RUST_PATH.
The tests no longer try to connect to github.com, which should
solve some of the sporadic failures we've been seeing.
@borsbors closed this Jul 15, 2013
flip1995 pushed a commit to flip1995/rust that referenced this pull request Oct 21, 2021
Implement uninit_vec lint
changelog: add the new lint [`uninit_vec`]
Fixrust-lang#7681
U007D pushed a commit to U007D/rust-mos that referenced this pull request Aug 21, 2026
7741: Add convert_for_to_iter_for_each assist r=mattyhall a=mattyhall
Implements one direction of rust-lang#7681 I wonder if this tries to guess too much at the right thing here. A common pattern is:
```rust
let col = vec![1, 2, 3];
for v in &mut col {
*v *= 2;
}
// equivalent to:
col.iter_mut().for_each(|v| *v *= 2);
```
I've tried to detect this case by checking if the expression after the `in` is a (mutable) reference and if not inserting iter()/iter_mut(). This is just a convention used in the stdlib however, so could sometimes be wrong. I'd be happy to make an improvement for this, but not sure what would be best. A few options spring to mind:
1. Only allow this for types that are known to have iter/iter_mut (ie stdlib types)
2. Try to check if iter/iter_mut exists and they return the right iterator type
3. Don't try to do this and just add `.into_iter()` to whatever is after `in`
Co-authored-by: Matt Hall <matthew@quickbeam.me.uk>
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants

@catamorphism@bors