1 #![feature(const_trait_impl)]
2 #![feature(associated_type_bounds)]
8 fn rpit() -> impl ~const T { S }
9 //~^ ERROR `~const` is not allowed
11 fn apit(_: impl ~const T) {}
12 //~^ ERROR `~const` is not allowed
14 fn rpit_assoc_bound() -> impl IntoIterator<Item: ~const T> { Some(S) }
15 //~^ ERROR `~const` is not allowed
17 fn apit_assoc_bound(_: impl IntoIterator<Item: ~const T>) {}
18 //~^ ERROR `~const` is not allowed
20 fn generic<P: ~const T>() {}
21 //~^ ERROR `~const` is not allowed
23 fn where_clause<P>() where P: ~const T {}
24 //~^ ERROR `~const` is not allowed
26 struct TildeQuestion<T: ~const ?Sized>(std::marker::PhantomData<T>);
27 //~^ ERROR `~const` and `?` are mutually exclusive