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
13 fn trait_object() -> &'static dyn ?const T { &S }
14 //~^ ERROR `?const` is not permitted in trait objects
16 fn trait_object_in_apit(_: impl IntoIterator<Item = Box<dyn ?const T>>) {}
17 //~^ ERROR `?const` is not permitted in trait objects