mirror of
https://github.com/rust-lang/rust-clippy
synced 2024-11-23 13:13:34 +00:00
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 #83564.
This commit is contained in:
parent
ba347f9815
commit
fa9274c99b
1 changed files with 1 additions and 3 deletions
|
@ -4,9 +4,7 @@ error[E0412]: cannot find type `PhantomData` in this scope
|
|||
LL | _n: PhantomData,
|
||||
| ^^^^^^^^^^^ not found in this scope
|
||||
|
|
||||
help: consider importing one of these items
|
||||
|
|
||||
LL + use core::marker::PhantomData;
|
||||
help: consider importing this struct
|
||||
|
|
||||
LL + use std::marker::PhantomData;
|
||||
|
|
||||
|
|
Loading…
Reference in a new issue