diagnostics: avoid querying associated_item in the resolver

Fixes #108529
This commit is contained in:
Michael Howell 2023-02-27 08:48:50 -07:00
parent 49b9cc5139
commit f058bb0fcf
3 changed files with 23 additions and 2 deletions

View file

@ -0,0 +1,8 @@
#![allow(nonstandard_style)]
use f::f::f; //~ ERROR
trait f {
extern "C" fn f();
}
fn main() {}

View file

@ -0,0 +1,9 @@
error[E0432]: unresolved import `f::f`
--> $DIR/issue-108529.rs:2:8
|
LL | use f::f::f;
| ^ expected type, found associated function `f` in `f`
error: aborting due to previous error
For more information about this error, try `rustc --explain E0432`.