5de8e6edfc
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.
74 lines
3.2 KiB
Plaintext
74 lines
3.2 KiB
Plaintext
error[E0432]: unresolved import `empty::issue_56125`
|
|
--> $DIR/issue-56125.rs:17:9
|
|
|
|
|
LL | use empty::issue_56125;
|
|
| ^^^^^^^^^^^^^^^^^^ no `issue_56125` in `m3::empty`
|
|
|
|
|
help: consider importing one of these modules instead
|
|
|
|
|
LL | use crate::m3::last_segment::issue_56125;
|
|
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
|
LL | use crate::m3::non_last_segment::non_last_segment::issue_56125;
|
|
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
|
LL | use ::issue_56125::issue_56125;
|
|
| ~~~~~~~~~~~~~~~~~~~~~~~~~~
|
|
LL | use ::issue_56125::last_segment::issue_56125;
|
|
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
|
and 1 other candidate
|
|
|
|
error[E0659]: `issue_56125` is ambiguous
|
|
--> $DIR/issue-56125.rs:6:9
|
|
|
|
|
LL | use issue_56125::last_segment::*;
|
|
| ^^^^^^^^^^^ ambiguous name
|
|
|
|
|
= note: ambiguous because of a conflict between a name from a glob import and an outer scope during import or macro resolution
|
|
= note: `issue_56125` could refer to a crate passed with `--extern`
|
|
= help: use `::issue_56125` to refer to this crate unambiguously
|
|
note: `issue_56125` could also refer to the module imported here
|
|
--> $DIR/issue-56125.rs:6:9
|
|
|
|
|
LL | use issue_56125::last_segment::*;
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
|
= help: consider adding an explicit import of `issue_56125` to disambiguate
|
|
= help: or use `self::issue_56125` to refer to this module unambiguously
|
|
|
|
error[E0659]: `issue_56125` is ambiguous
|
|
--> $DIR/issue-56125.rs:11:9
|
|
|
|
|
LL | use issue_56125::non_last_segment::non_last_segment::*;
|
|
| ^^^^^^^^^^^ ambiguous name
|
|
|
|
|
= note: ambiguous because of a conflict between a name from a glob import and an outer scope during import or macro resolution
|
|
= note: `issue_56125` could refer to a crate passed with `--extern`
|
|
= help: use `::issue_56125` to refer to this crate unambiguously
|
|
note: `issue_56125` could also refer to the module imported here
|
|
--> $DIR/issue-56125.rs:11:9
|
|
|
|
|
LL | use issue_56125::non_last_segment::non_last_segment::*;
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
|
= help: consider adding an explicit import of `issue_56125` to disambiguate
|
|
= help: or use `self::issue_56125` to refer to this module unambiguously
|
|
|
|
error[E0659]: `issue_56125` is ambiguous
|
|
--> $DIR/issue-56125.rs:18:9
|
|
|
|
|
LL | use issue_56125::*;
|
|
| ^^^^^^^^^^^ ambiguous name
|
|
|
|
|
= note: ambiguous because of a conflict between a name from a glob import and an outer scope during import or macro resolution
|
|
= note: `issue_56125` could refer to a crate passed with `--extern`
|
|
= help: use `::issue_56125` to refer to this crate unambiguously
|
|
note: `issue_56125` could also refer to the module imported here
|
|
--> $DIR/issue-56125.rs:18:9
|
|
|
|
|
LL | use issue_56125::*;
|
|
| ^^^^^^^^^^^^^^
|
|
= help: consider adding an explicit import of `issue_56125` to disambiguate
|
|
= help: or use `self::issue_56125` to refer to this module unambiguously
|
|
|
|
error: aborting due to 4 previous errors
|
|
|
|
Some errors have detailed explanations: E0432, E0659.
|
|
For more information about an error, try `rustc --explain E0432`.
|