diff options
author | Esteban Küber <esteban@kuber.com.ar> | 2024-06-12 23:51:31 +0000 |
---|---|---|
committer | Esteban Küber <esteban@kuber.com.ar> | 2024-06-13 20:22:21 +0000 |
commit | 5de8e6edfcc747930891a0adc8e90608776dbe54 (patch) | |
tree | 770cb18a4f3c28cd3702507d09e2915585f44cc0 /tests/ui/rust-2018 | |
parent | f1586001ace26df7cafeb6534eaf76fb2c5513e5 (diff) |
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.
Diffstat (limited to 'tests/ui/rust-2018')
-rw-r--r-- | tests/ui/rust-2018/issue-52202-use-suggestions.stderr | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/tests/ui/rust-2018/issue-52202-use-suggestions.stderr b/tests/ui/rust-2018/issue-52202-use-suggestions.stderr index 49736205f20..ee1a336ea98 100644 --- a/tests/ui/rust-2018/issue-52202-use-suggestions.stderr +++ b/tests/ui/rust-2018/issue-52202-use-suggestions.stderr @@ -4,7 +4,7 @@ error[E0422]: cannot find struct, variant or union type `Drain` in this scope LL | let _d = Drain {}; | ^^^^^ not found in this scope | -help: consider importing one of these items +help: consider importing one of these structs | LL + use crate::plumbing::Drain; | |