We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 437c07f commit 0005f29Copy full SHA for 0005f29
src/test/ui/impl-trait/issue-60473.rs
@@ -0,0 +1,16 @@
1
+// Regression test for #60473
2
+
3
+#![feature(impl_trait_in_bindings)]
4
+#![allow(incomplete_features)]
5
6
+struct A<'a>(&'a ());
7
8
+trait Trait<T> {
9
+}
10
11
+impl<T> Trait<T> for () {
12
13
14
+fn main() {
15
+ let x: impl Trait<A> = (); //~ ERROR: opaque type expands to a recursive type
16
src/test/ui/impl-trait/issue-60473.stderr
@@ -0,0 +1,11 @@
+error[E0720]: opaque type expands to a recursive type
+ --> $DIR/issue-60473.rs:15:12
+ |
+LL | let x: impl Trait<A> = ();
+ | ^^^^^^^^^^^^^ expands to a recursive type
+ = note: type resolves to itself
+error: aborting due to previous error
+For more information about this error, try `rustc --explain E0720`.
0 commit comments