-
Notifications
You must be signed in to change notification settings - Fork 12.8k
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
Tweak output of import suggestions #126371
Conversation
This comment has been minimized.
This comment has been minimized.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for splitting this out of the other PR :D
r=me once tests fixed (extraneous trailing line break in the rustfixed file or sth. like that)
@@ -2,9 +2,19 @@ | |||
// | |||
// This is a regression test for #83564. | |||
// For some reason, Rust 2018 or higher is required to reproduce the bug. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Huh, odd. Might be worth investigating some time.
This comment has been minimized.
This comment has been minimized.
Some changes occurred in src/tools/clippy cc @rust-lang/clippy |
@bors r=fmease |
Tweak output of import suggestions When both `std::` and `core::` items are available, only suggest the `std::` ones. We ensure that in `no_std` crates we suggest `core::` items. Ensure that the list of items suggested to be imported are always in the order of local crate items, `std`/`core` items and finally foreign crate items. Tweak wording of import suggestion: if there are multiple items but they are all of the same kind, we use the kind name and not the generic "items". Fix rust-lang#83564.
This comment has been minimized.
This comment has been minimized.
…iaskrgr Rollup of 10 pull requests Successful merges: - rust-lang#123726 (Clarify `Command::new` behavior for programs with arguments) - rust-lang#126088 ([1/2] clean-up / general improvements) - rust-lang#126238 (Fix Miri sysroot for `x run`) - rust-lang#126315 (Add pub struct with allow(dead_code) into worklist) - rust-lang#126360 (Uplift `structural_traits.rs` into the new trait solver) - rust-lang#126371 (Tweak output of import suggestions) - rust-lang#126388 (const-eval: make lint scope computation consistent) - rust-lang#126390 (Fix wording in {checked_}next_power_of_two) - rust-lang#126392 (Small style improvement in `gvn.rs`) - rust-lang#126402 (Fix wrong `assert_unsafe_precondition` message for `core::ptr::copy`) r? `@ghost` `@rustbot` modify labels: rollup
I'm not sure what the rustdoc test error is. I cannot replicate by running |
When both `std::` and `core::` items are available, only suggest the `std::` ones. We ensure that in `no_std` crates we suggest `core::` items. Ensure that the list of items suggested to be imported are always in the order of local crate items, `std`/`core` items and finally foreign crate items. Tweak wording of import suggestion: if there are multiple items but they are all of the same kind, we use the kind name and not the generic "items". Fix rust-lang#83564.
The job Click to see the possible cause of the failure (guessed by this bot)
|
…iaskrgr Rollup of 10 pull requests Successful merges: - rust-lang#123726 (Clarify `Command::new` behavior for programs with arguments) - rust-lang#126088 ([1/2] clean-up / general improvements) - rust-lang#126238 (Fix Miri sysroot for `x run`) - rust-lang#126315 (Add pub struct with allow(dead_code) into worklist) - rust-lang#126360 (Uplift `structural_traits.rs` into the new trait solver) - rust-lang#126371 (Tweak output of import suggestions) - rust-lang#126388 (const-eval: make lint scope computation consistent) - rust-lang#126390 (Fix wording in {checked_}next_power_of_two) - rust-lang#126392 (Small style improvement in `gvn.rs`) - rust-lang#126402 (Fix wrong `assert_unsafe_precondition` message for `core::ptr::copy`) r? `@ghost` `@rustbot` modify labels: rollup
Rollup merge of rust-lang#126371 - estebank:suggest-core, r=fmease Tweak output of import suggestions When both `std::` and `core::` items are available, only suggest the `std::` ones. We ensure that in `no_std` crates we suggest `core::` items. Ensure that the list of items suggested to be imported are always in the order of local crate items, `std`/`core` items and finally foreign crate items. Tweak wording of import suggestion: if there are multiple items but they are all of the same kind, we use the kind name and not the generic "items". Fix rust-lang#83564.
When both
std::
andcore::
items are available, only suggest thestd::
ones. We ensure that inno_std
crates we suggestcore::
items.Ensure that the list of items suggested to be imported are always in the order of local crate items,
std
/core
items and finally foreign crate items.Tweak wording of import suggestion: if there are multiple items but they are all of the same kind, we use the kind name and not the generic "items".
Fix #83564.