error: `~const` is not allowed here --> $DIR/tilde-const-invalid-places.rs:7:26 | LL | fn non_const_function() {} | ^^^^^^ | note: this function is not `const`, so it cannot have `~const` trait bounds --> $DIR/tilde-const-invalid-places.rs:7:4 | LL | fn non_const_function() {} | ^^^^^^^^^^^^^^^^^^ error: `~const` is not allowed here --> $DIR/tilde-const-invalid-places.rs:9:18 | LL | struct Struct { field: T } | ^^^^^^ | = note: this item cannot have `~const` trait bounds error: `~const` is not allowed here --> $DIR/tilde-const-invalid-places.rs:10:23 | LL | struct TupleStruct(T); | ^^^^^^ | = note: this item cannot have `~const` trait bounds error: `~const` is not allowed here --> $DIR/tilde-const-invalid-places.rs:11:22 | LL | struct UnitStruct; | ^^^^^^ | = note: this item cannot have `~const` trait bounds error: `~const` is not allowed here --> $DIR/tilde-const-invalid-places.rs:13:14 | LL | enum Enum { Variant(T) } | ^^^^^^ | = note: this item cannot have `~const` trait bounds error: `~const` is not allowed here --> $DIR/tilde-const-invalid-places.rs:15:16 | LL | union Union { field: T } | ^^^^^^ | = note: this item cannot have `~const` trait bounds error: `~const` is not allowed here --> $DIR/tilde-const-invalid-places.rs:17:14 | LL | type Type = T; | ^^^^^^ | = note: this item cannot have `~const` trait bounds error: `~const` is not allowed here --> $DIR/tilde-const-invalid-places.rs:19:19 | LL | const CONSTANT: () = (); | ^^^^^^ | = note: this item cannot have `~const` trait bounds error: `~const` is not allowed here --> $DIR/tilde-const-invalid-places.rs:23:18 | LL | type Type: ~const Trait; | ^^^^^^ | = note: this item cannot have `~const` trait bounds error: `~const` is not allowed here --> $DIR/tilde-const-invalid-places.rs:23:33 | LL | type Type: ~const Trait; | ^^^^^^ | = note: this item cannot have `~const` trait bounds error: `~const` is not allowed here --> $DIR/tilde-const-invalid-places.rs:26:30 | LL | fn non_const_function(); | ^^^^^^ | note: this function is not `const`, so it cannot have `~const` trait bounds --> $DIR/tilde-const-invalid-places.rs:26:8 | LL | fn non_const_function(); | ^^^^^^^^^^^^^^^^^^ error: `~const` is not allowed here --> $DIR/tilde-const-invalid-places.rs:27:23 | LL | const CONSTANT: (); | ^^^^^^ | = note: this item cannot have `~const` trait bounds error: `~const` is not allowed here --> $DIR/tilde-const-invalid-places.rs:32:18 | LL | type Type = (); | ^^^^^^ | = note: this item cannot have `~const` trait bounds error: `~const` is not allowed here --> $DIR/tilde-const-invalid-places.rs:33:30 | LL | fn non_const_function() {} | ^^^^^^ | note: this function is not `const`, so it cannot have `~const` trait bounds --> $DIR/tilde-const-invalid-places.rs:33:8 | LL | fn non_const_function() {} | ^^^^^^^^^^^^^^^^^^ error: `~const` is not allowed here --> $DIR/tilde-const-invalid-places.rs:34:23 | LL | const CONSTANT: () = (); | ^^^^^^ | = note: this item cannot have `~const` trait bounds error: `~const` is not allowed here --> $DIR/tilde-const-invalid-places.rs:41:18 | LL | type Type = (); | ^^^^^^ | = note: this item cannot have `~const` trait bounds error: `~const` is not allowed here --> $DIR/tilde-const-invalid-places.rs:43:30 | LL | fn non_const_function() {} | ^^^^^^ | note: this function is not `const`, so it cannot have `~const` trait bounds --> $DIR/tilde-const-invalid-places.rs:43:8 | LL | fn non_const_function() {} | ^^^^^^^^^^^^^^^^^^ error: `~const` is not allowed here --> $DIR/tilde-const-invalid-places.rs:44:23 | LL | const CONSTANT: () = (); | ^^^^^^ | = note: this item cannot have `~const` trait bounds error: `~const` is not allowed here --> $DIR/tilde-const-invalid-places.rs:49:15 | LL | trait Child0: ~const Trait {} | ^^^^^^ | note: this trait is not a `#[const_trait]`, so it cannot have `~const` trait bounds --> $DIR/tilde-const-invalid-places.rs:49:1 | LL | trait Child0: ~const Trait {} | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ error: `~const` is not allowed here --> $DIR/tilde-const-invalid-places.rs:50:26 | LL | trait Child1 where Self: ~const Trait {} | ^^^^^^ | note: this trait is not a `#[const_trait]`, so it cannot have `~const` trait bounds --> $DIR/tilde-const-invalid-places.rs:50:1 | LL | trait Child1 where Self: ~const Trait {} | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ error: `~const` is not allowed here --> $DIR/tilde-const-invalid-places.rs:53:9 | LL | impl Trait for T {} | ^^^^^^ | note: this impl is not `const`, so it cannot have `~const` trait bounds --> $DIR/tilde-const-invalid-places.rs:53:1 | LL | impl Trait for T {} | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ error: `~const` is not allowed here --> $DIR/tilde-const-invalid-places.rs:56:9 | LL | impl Struct {} | ^^^^^^ | note: inherent impls cannot have `~const` trait bounds --> $DIR/tilde-const-invalid-places.rs:56:1 | LL | impl Struct {} | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ error[E0658]: generic const items are experimental --> $DIR/tilde-const-invalid-places.rs:19:15 | LL | const CONSTANT: () = (); | ^^^^^^^^^^^^^^^^^ | = note: see issue #113521 for more information = help: add `#![feature(generic_const_items)]` to the crate attributes to enable error[E0658]: generic const items are experimental --> $DIR/tilde-const-invalid-places.rs:27:19 | LL | const CONSTANT: (); | ^^^^^^^^^^^^^^^^^ | = note: see issue #113521 for more information = help: add `#![feature(generic_const_items)]` to the crate attributes to enable error[E0658]: generic const items are experimental --> $DIR/tilde-const-invalid-places.rs:34:19 | LL | const CONSTANT: () = (); | ^^^^^^^^^^^^^^^^^ | = note: see issue #113521 for more information = help: add `#![feature(generic_const_items)]` to the crate attributes to enable error[E0658]: generic const items are experimental --> $DIR/tilde-const-invalid-places.rs:44:19 | LL | const CONSTANT: () = (); | ^^^^^^^^^^^^^^^^^ | = note: see issue #113521 for more information = help: add `#![feature(generic_const_items)]` to the crate attributes to enable error[E0658]: inherent associated types are unstable --> $DIR/tilde-const-invalid-places.rs:41:5 | LL | type Type = (); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | = note: see issue #8995 for more information = help: add `#![feature(inherent_associated_types)]` to the crate attributes to enable error: aborting due to 27 previous errors For more information about this error, try `rustc --explain E0658`.