]> git.lizzy.rs Git - rust.git/blob - src/test/ui/parser/trait-object-trait-parens.rs
Rollup merge of #61423 - davidtwco:correct-symbol-mangling, r=eddyb
[rust.git] / src / test / ui / parser / trait-object-trait-parens.rs
1 trait Trait<'a> {}
2
3 fn f<T: (Copy) + (?Sized) + (for<'a> Trait<'a>)>() {}
4
5 fn main() {
6     let _: Box<(Copy) + (?Sized) + (for<'a> Trait<'a>)>;
7     //~^ ERROR `?Trait` is not permitted in trait object types
8     //~| WARN trait objects without an explicit `dyn` are deprecated
9     let _: Box<(?Sized) + (for<'a> Trait<'a>) + (Copy)>;
10     //~^ WARN trait objects without an explicit `dyn` are deprecated
11     let _: Box<(for<'a> Trait<'a>) + (Copy) + (?Sized)>;
12     //~^ ERROR use of undeclared lifetime name `'a`
13     //~| ERROR `?Trait` is not permitted in trait object types
14     //~| WARN trait objects without an explicit `dyn` are deprecated
15 }