]>
git.proxmox.com Git - rustc.git/blob - src/test/ui/traits/wf-object/maybe-bound.rs
1 // Test that `dyn ... + ?Sized + ...` is okay (though `?Sized` has no effect in trait objects).
5 type _0
= dyn ?Sized
+ Foo
;
6 //~^ ERROR `?Trait` is not permitted in trait object types
8 type _1
= dyn Foo
+ ?Sized
;
9 //~^ ERROR `?Trait` is not permitted in trait object types
11 type _2
= dyn Foo
+ ?Sized
+ ?Sized
;
12 //~^ ERROR `?Trait` is not permitted in trait object types
13 //~| ERROR `?Trait` is not permitted in trait object types
15 type _3
= dyn ?Sized
+ Foo
;
16 //~^ ERROR `?Trait` is not permitted in trait object types