Skip to content

Commit 0005f29

Browse files
committed
Add test for issue-60473
1 parent 437c07f commit 0005f29

File tree

2 files changed

+27
-0
lines changed

2 files changed

+27
-0
lines changed

src/test/ui/impl-trait/issue-60473.rs

+16
Original file line numberDiff line numberDiff line change
@@ -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+
}
+11
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
error[E0720]: opaque type expands to a recursive type
2+
--> $DIR/issue-60473.rs:15:12
3+
|
4+
LL | let x: impl Trait<A> = ();
5+
| ^^^^^^^^^^^^^ expands to a recursive type
6+
|
7+
= note: type resolves to itself
8+
9+
error: aborting due to previous error
10+
11+
For more information about this error, try `rustc --explain E0720`.

0 commit comments

Comments
 (0)