error: `~const` is not allowed here --> $DIR/tilde-const-invalid-places.rs:9:19 | LL | fn rpit() -> impl ~const T { S } | ^^^^^^^^ | = note: `impl Trait`s cannot have `~const` trait bounds error: `~const` is not allowed here --> $DIR/tilde-const-invalid-places.rs:12:17 | LL | fn apit(_: impl ~const T) {} | ^^^^^^^^ | = note: `impl Trait`s cannot have `~const` trait bounds error: `~const` is not allowed here --> $DIR/tilde-const-invalid-places.rs:15:50 | LL | fn rpit_assoc_bound() -> impl IntoIterator { Some(S) } | ^^^^^^^^ | = note: `impl Trait`s cannot have `~const` trait bounds error: `~const` is not allowed here --> $DIR/tilde-const-invalid-places.rs:18:48 | LL | fn apit_assoc_bound(_: impl IntoIterator) {} | ^^^^^^^^ | = note: `impl Trait`s cannot have `~const` trait bounds error: `~const` and `?` are mutually exclusive --> $DIR/tilde-const-invalid-places.rs:21:25 | LL | struct TildeQuestion(std::marker::PhantomData); | ^^^^^^^^^^^^^ error: aborting due to 5 previous errors