Skip to content

Commit 579ce86

Browse files
committed
Add test for issue-67166
1 parent 95d4785 commit 579ce86

File tree

2 files changed

+22
-0
lines changed

2 files changed

+22
-0
lines changed

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

+11
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
// Regression test for #67166
2+
3+
#![feature(impl_trait_in_bindings)]
4+
#![allow(incomplete_features)]
5+
6+
pub fn run() {
7+
let _foo: Box<impl Copy + '_> = Box::new(());
8+
//~^ ERROR: opaque type expands to a recursive type
9+
}
10+
11+
fn main() {}
+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-67166.rs:7:19
3+
|
4+
LL | let _foo: Box<impl Copy + '_> = Box::new(());
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)