rust/tests/ui/did_you_mean/issue-56028-there-is-an-enum-variant.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

41 lines
1.1 KiB
Plaintext

error[E0412]: cannot find type `Set` in this scope
--> $DIR/issue-56028-there-is-an-enum-variant.rs:9:15
|
LL | fn setup() -> Set { Set }
| ^^^ not found in this scope
|
help: there is an enum variant `AffixHeart::Set` and 7 others; try using the variant's enum
|
LL | fn setup() -> AffixHeart { Set }
| ~~~~~~~~~~
LL | fn setup() -> CauseToBe { Set }
| ~~~~~~~~~
LL | fn setup() -> Determine { Set }
| ~~~~~~~~~
LL | fn setup() -> PutDown { Set }
| ~~~~~~~
and 3 other candidates
error[E0425]: cannot find value `Set` in this scope
--> $DIR/issue-56028-there-is-an-enum-variant.rs:9:21
|
LL | fn setup() -> Set { Set }
| ^^^ not found in this scope
|
help: consider importing one of these unit variants
|
LL + use AffixHeart::Set;
|
LL + use CauseToBe::Set;
|
LL + use Determine::Set;
|
LL + use PutDown::Set;
|
and 3 other candidates
error: aborting due to 2 previous errors
Some errors have detailed explanations: E0412, E0425.
For more information about an error, try `rustc --explain E0412`.