We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 95d4785 commit 579ce86Copy full SHA for 579ce86
src/test/ui/impl-trait/issue-67166.rs
@@ -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() {}
src/test/ui/impl-trait/issue-67166.stderr
+error[E0720]: opaque type expands to a recursive type
+ --> $DIR/issue-67166.rs:7:19
+ |
+LL | let _foo: Box<impl Copy + '_> = Box::new(());
+ | ^^^^^^^^^^^^^^ 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