rust/tests/ui/resolve/issue-21221-1.stderr
Esteban Küber 5de8e6edfc 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.
2024-06-13 20:22:21 +00:00

52 lines
1.2 KiB
Plaintext

error[E0405]: cannot find trait `Mul` in this scope
--> $DIR/issue-21221-1.rs:43:6
|
LL | impl Mul for Foo {
| ^^^ not found in this scope
|
help: consider importing one of these traits
|
LL + use std::ops::Mul;
|
LL + use mul1::Mul;
|
LL + use mul2::Mul;
|
error[E0412]: cannot find type `Mul` in this scope
--> $DIR/issue-21221-1.rs:58:16
|
LL | fn getMul() -> Mul {
| ^^^ not found in this scope
|
help: consider importing one of these traits
|
LL + use std::ops::Mul;
|
LL + use mul1::Mul;
|
LL + use mul2::Mul;
|
error[E0405]: cannot find trait `ThisTraitReallyDoesntExistInAnyModuleReally` in this scope
--> $DIR/issue-21221-1.rs:63:6
|
LL | impl ThisTraitReallyDoesntExistInAnyModuleReally for Foo {
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ not found in this scope
error[E0405]: cannot find trait `Div` in this scope
--> $DIR/issue-21221-1.rs:68:6
|
LL | impl Div for Foo {
| ^^^ not found in this scope
|
help: consider importing this trait
|
LL + use std::ops::Div;
|
error: aborting due to 4 previous errors
Some errors have detailed explanations: E0405, E0412.
For more information about an error, try `rustc --explain E0405`.