1 #![feature(const_trait_bound_opt_out)]
2 #![allow(bare_trait_objects)]
3 #![allow(incomplete_features)]
9 // An inherent impl for the trait object `?const T`.
11 //~^ ERROR `?const` is not permitted in trait objects
12 //~| ERROR `?const` on trait bounds is not yet implemented
14 fn trait_object() -> &'static dyn ?const T { &S }
15 //~^ ERROR `?const` is not permitted in trait objects
16 //~| ERROR `?const` on trait bounds is not yet implemented
18 fn trait_object_in_apit(_: impl IntoIterator<Item = Box<dyn ?const T>>) {}
19 //~^ ERROR `?const` is not permitted in trait objects
20 //~| ERROR `?const` on trait bounds is not yet implemented