about summary refs log tree commit diff
path: root/tests/ui/issues/issue-66353.rs
diff options
context:
space:
mode:
Diffstat (limited to 'tests/ui/issues/issue-66353.rs')
-rw-r--r--tests/ui/issues/issue-66353.rs15
1 files changed, 15 insertions, 0 deletions
diff --git a/tests/ui/issues/issue-66353.rs b/tests/ui/issues/issue-66353.rs
new file mode 100644
index 00000000000..d8abdd5206e
--- /dev/null
+++ b/tests/ui/issues/issue-66353.rs
@@ -0,0 +1,15 @@
+// #66353: ICE when trying to recover from incorrect associated type
+
+trait _Func<T> {
+    fn func(_: Self);
+}
+
+trait _A {
+    type AssocT;
+}
+
+fn main() {
+    _Func::< <() as _A>::AssocT >::func(());
+    //~^ ERROR the trait bound `(): _A` is not satisfied
+    //~| ERROR the trait bound `(): _Func<_>` is not satisfied
+}