about summary refs log tree commit diff
path: root/tests
diff options
context:
space:
mode:
authorMatthias Krüger <matthias.krueger@famsik.de>2023-02-27 18:48:51 +0100
committerGitHub <noreply@github.com>2023-02-27 18:48:51 +0100
commita184150247298c98edd445d241ef487e197c91a9 (patch)
tree0ef12dd8679cca8e65e6b9bb14bd578f4e145058 /tests
parent828b66e6de8c8b0aaf33bf971d36bd6de75cd7ca (diff)
parentf058bb0fcfeef3ebb0da19b2399f575c3aa9c3e8 (diff)
downloadrust-a184150247298c98edd445d241ef487e197c91a9.tar.gz
rust-a184150247298c98edd445d241ef487e197c91a9.zip
Rollup merge of #108533 - notriddle:notriddle/resolver-def-descr, r=compiler-errors
diagnostics: avoid querying `associated_item` in the resolver

Fixes #108529

CC #108324
Diffstat (limited to 'tests')
-rw-r--r--tests/ui/resolve/issue-108529.rs8
-rw-r--r--tests/ui/resolve/issue-108529.stderr9
2 files changed, 17 insertions, 0 deletions
diff --git a/tests/ui/resolve/issue-108529.rs b/tests/ui/resolve/issue-108529.rs
new file mode 100644
index 00000000000..8e3aafab6aa
--- /dev/null
+++ b/tests/ui/resolve/issue-108529.rs
@@ -0,0 +1,8 @@
+#![allow(nonstandard_style)]
+use f::f::f; //~ ERROR
+
+trait f {
+    extern "C" fn f();
+}
+
+fn main() {}
diff --git a/tests/ui/resolve/issue-108529.stderr b/tests/ui/resolve/issue-108529.stderr
new file mode 100644
index 00000000000..cf4e4759c37
--- /dev/null
+++ b/tests/ui/resolve/issue-108529.stderr
@@ -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`.