add regression test for #79467

This commit is contained in:
Takayuki Maeda 2022-07-04 22:29:03 +09:00
parent 2557603f32
commit dcd6620e36
2 changed files with 17 additions and 0 deletions

View File

@ -0,0 +1,8 @@
fn g()
where
'static: 'static,
dyn 'static: 'static + Copy, //~ ERROR at least one trait is required for an object type
{
}
fn main() {}

View File

@ -0,0 +1,9 @@
error[E0224]: at least one trait is required for an object type
--> $DIR/issue-79467.rs:4:5
|
LL | dyn 'static: 'static + Copy,
| ^^^^^^^^^^^
error: aborting due to previous error
For more information about this error, try `rustc --explain E0224`.