Trait suggestions should use outermost candidates #31323
Labels
A-diagnostics
Area: Messages for errors, warnings, and lints
C-enhancement
Category: An issue proposing an enhancement or a PR with one.
T-compiler
Relevant to the compiler team, which will review and decide on the PR/issue.
Beginning with issue #21405, Rust combines multiple identical candidates into one (in some way). Since crates typically
pub use
the traits on the outermost level (e.g.module::TheTrait
instead ofmodule::inner::detail::TheTrait
), the outermost candidate should be displayed as suggestion.Here's a real-life example:
However the trait "JsonBody" can be imported with just
use nickel::JsonBody
.The text was updated successfully, but these errors were encountered: