Add test for issue-67166

This commit is contained in:
Yuki Okushi 2020-03-09 09:12:53 +09:00
parent 95d478546f
commit 579ce86d4b
No known key found for this signature in database
GPG Key ID: B0986C85C0E2DAA1
2 changed files with 22 additions and 0 deletions

View File

@ -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() {}

View File

@ -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`.