-
-
Notifications
You must be signed in to change notification settings - Fork 14.2k
Closed
Labels
A-diagnosticsArea: Messages for errors, warnings, and lintsArea: Messages for errors, warnings, and lints
Description
I encountered this when doing some work on the compiler. I started using the Binder type in code, then compiled, and correctly received an error that the type isn't in scope. However, the "possible candidate is found in another module" help message suggests a path that is private, rather than the public re-export at ty::Binder. I think the candidate search algorithm ignores the visibility of the type, and stops searching too early.
error[E0412]: cannot find type `Binder` in this scope
--> librustc/traits/util.rs:121:29
|
121 | -> impl Iterator<Item = Binder<ty::Predicate<'tcx>>> + 'gcx
| ^^^^^^ not found in this scope
help: possible candidate is found in another module, you can import it into scope
|
11 | use ty::sty::Binder;
|
Metadata
Metadata
Assignees
Labels
A-diagnosticsArea: Messages for errors, warnings, and lintsArea: Messages for errors, warnings, and lints