Rollup merge of #98889 - TaKO8Ki:add-regression-test-for-79467, r=Dylan-DPC

Add regression test for #79467

closes #79467
This commit is contained in:
Matthias Krüger 2022-07-05 17:08:12 +02:00 committed by GitHub
commit 70ade7d503
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
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`.