]>
git.proxmox.com Git - rustc.git/blob - src/test/ui/parser/trait-object-trait-parens.rs
5 fn f
<T
: (Copy
) + (?Sized
) + (for<'a
> Trait
<'a
>)>() {}
8 let _
: Box
<(Obj
) + (?Sized
) + (for<'a
> Trait
<'a
>)>;
9 //~^ ERROR `?Trait` is not permitted in trait object types
10 //~| ERROR only auto traits can be used as additional traits
11 //~| WARN trait objects without an explicit `dyn` are deprecated
12 //~| WARN this was previously accepted by the compiler
13 let _
: Box
<?Sized
+ (for<'a
> Trait
<'a
>) + (Obj
)>;
14 //~^ ERROR `?Trait` is not permitted in trait object types
15 //~| ERROR only auto traits can be used as additional traits
16 //~| WARN trait objects without an explicit `dyn` are deprecated
17 //~| WARN this was previously accepted by the compiler
18 let _
: Box
<for<'a
> Trait
<'a
> + (Obj
) + (?Sized
)>;
19 //~^ ERROR `?Trait` is not permitted in trait object types
20 //~| ERROR only auto traits can be used as additional traits
21 //~| WARN trait objects without an explicit `dyn` are deprecated
22 //~| WARN this was previously accepted by the compiler