Rollup of 7 pull requests#124906
Closed
matthiaskrgr wants to merge 19 commits intorust-lang:masterfrom
Closed
Conversation
They can just be written as `use rustc_foo::bar`, which is far more standard. (I didn't even know that a `crate::` prefix was valid.)
…Nilstrieb Remove braces when fixing a nested use tree into a single item [Back in 2019](rust-lang#56645) I added rustfix support for the `unused_imports` lint, to automatically remove them when running `cargo fix`. For the most part this worked great, but when removing all but one childs of a nested use tree it turned `use foo::{Unused, Used}` into `use foo::{Used}`. This is slightly annoying, because it then requires you to run `rustfmt` to get `use foo::Used`. This PR automatically removes braces and the surrouding whitespace when all but one child of a nested use tree are unused. To get it done I had to add the span of the nested use tree to the AST, and refactor a bit the code I wrote back then. A thing I noticed is, there doesn't seem to be any `//@ run-rustfix` test for fixing the `unused_imports` lint. I created a test in `tests/suggestions` (is that the right directory?) that for now tests just what I added in the PR. I can followup in a separate PR to add more tests for fixing `unused_lints`. This PR is best reviewed commit-by-commit.
…r=dtolnay Generic `NonZero` post-stabilization changes. Tracking issue: rust-lang#120257 r? `@dtolnay`
crashes: add lastest batch of crash tests
Make sure we don't deny macro vars w keyword names `$async:ident`, etc are all valid. Fixes rust-lang#124862
…, r=compiler-errors Simplify `use crate::rustc_foo::bar` occurrences. They can just be written as `use rustc_foo::bar`, which is far more standard. (I didn't even know that a `crate::` prefix was valid.) r? `@eholk`
Update cc crate to v1.0.97
Member
Author
|
@bors r+ rollup=never p=7 |
Collaborator
Contributor
|
#124548 closed. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Successful merges:
struct_tail_erasing_lifetimes#124548 (Handle normalization failure instruct_tail_erasing_lifetimes)NonZeropost-stabilization changes. #124587 (GenericNonZeropost-stabilization changes.)use crate::rustc_foo::baroccurrences. #124876 (Simplifyuse crate::rustc_foo::baroccurrences.)r? @ghost
@rustbot modify labels: rollup
Create a similar rollup