Skip to content

Commit

Permalink
Add test for issue-67166
Browse files Browse the repository at this point in the history
  • Loading branch information
JohnTitor committed Mar 9, 2020
1 parent 95d4785 commit 579ce86
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 0 deletions.
11 changes: 11 additions & 0 deletions src/test/ui/impl-trait/issue-67166.rs
@@ -0,0 +1,11 @@
// Regression test for #67166

#![feature(impl_trait_in_bindings)]
#![allow(incomplete_features)]

pub fn run() {
let _foo: Box<impl Copy + '_> = Box::new(());
//~^ ERROR: opaque type expands to a recursive type
}

fn main() {}
11 changes: 11 additions & 0 deletions src/test/ui/impl-trait/issue-67166.stderr
@@ -0,0 +1,11 @@
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 comments on commit 579ce86

Please sign in to comment.