mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-26 00:34:06 +00:00
Add test for issue-67166
This commit is contained in:
parent
95d478546f
commit
579ce86d4b
11
src/test/ui/impl-trait/issue-67166.rs
Normal file
11
src/test/ui/impl-trait/issue-67166.rs
Normal 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() {}
|
11
src/test/ui/impl-trait/issue-67166.stderr
Normal file
11
src/test/ui/impl-trait/issue-67166.stderr
Normal 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`.
|
Loading…
Reference in New Issue
Block a user