|  | 
|  | 1 | +error: `~const` is not allowed here | 
|  | 2 | +  --> const-super-trait.rs:7:12 | 
|  | 3 | +   | | 
|  | 4 | +LL | trait Bar: ~const Foo {} | 
|  | 5 | +   |            ^^^^^^ | 
|  | 6 | +   | | 
|  | 7 | +note: this trait is not a `#[const_trait]`, so it cannot have `~const` trait bounds | 
|  | 8 | +  --> const-super-trait.rs:7:1 | 
|  | 9 | +   | | 
|  | 10 | +LL | trait Bar: ~const Foo {} | 
|  | 11 | +   | ^^^^^^^^^^^^^^^^^^^^^^^^ | 
|  | 12 | + | 
|  | 13 | +error[E0658]: const trait impls are experimental | 
|  | 14 | +  --> const-super-trait.rs:7:12 | 
|  | 15 | +   | | 
|  | 16 | +LL | trait Bar: ~const Foo {} | 
|  | 17 | +   |            ^^^^^^ | 
|  | 18 | +   | | 
|  | 19 | +   = note: see issue #67792 <https://github.com/rust-lang/rust/issues/67792> for more information | 
|  | 20 | +   = help: add `#![feature(const_trait_impl)]` to the crate attributes to enable | 
|  | 21 | +   = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date | 
|  | 22 | + | 
|  | 23 | +error[E0658]: const trait impls are experimental | 
|  | 24 | +  --> const-super-trait.rs:9:17 | 
|  | 25 | +   | | 
|  | 26 | +LL | const fn foo<T: ~const Bar>(x: &T) { | 
|  | 27 | +   |                 ^^^^^^ | 
|  | 28 | +   | | 
|  | 29 | +   = note: see issue #67792 <https://github.com/rust-lang/rust/issues/67792> for more information | 
|  | 30 | +   = help: add `#![feature(const_trait_impl)]` to the crate attributes to enable | 
|  | 31 | +   = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date | 
|  | 32 | + | 
|  | 33 | +error: `~const` can only be applied to `#[const_trait]` traits | 
|  | 34 | +  --> const-super-trait.rs:7:12 | 
|  | 35 | +   | | 
|  | 36 | +LL | trait Bar: ~const Foo {} | 
|  | 37 | +   |            ^^^^^^ can't be applied to `Foo` | 
|  | 38 | +   | | 
|  | 39 | +help: enable `#![feature(const_trait_impl)]` in your crate and mark `Foo` as `#[const_trait]` to allow it to have `const` implementations | 
|  | 40 | +   | | 
|  | 41 | +LL | #[const_trait] trait Foo { | 
|  | 42 | +   | ++++++++++++++ | 
|  | 43 | + | 
|  | 44 | +error: `~const` can only be applied to `#[const_trait]` traits | 
|  | 45 | +  --> const-super-trait.rs:9:17 | 
|  | 46 | +   | | 
|  | 47 | +LL | const fn foo<T: ~const Bar>(x: &T) { | 
|  | 48 | +   |                 ^^^^^^ can't be applied to `Bar` | 
|  | 49 | +   | | 
|  | 50 | +help: enable `#![feature(const_trait_impl)]` in your crate and mark `Bar` as `#[const_trait]` to allow it to have `const` implementations | 
|  | 51 | +   | | 
|  | 52 | +LL | #[const_trait] trait Bar: ~const Foo {} | 
|  | 53 | +   | ++++++++++++++ | 
|  | 54 | + | 
|  | 55 | +error[E0015]: cannot call non-const fn `<T as Foo>::a` in constant functions | 
|  | 56 | +  --> const-super-trait.rs:10:7 | 
|  | 57 | +   | | 
|  | 58 | +LL |     x.a(); | 
|  | 59 | +   |       ^^^ | 
|  | 60 | +   | | 
|  | 61 | +   = note: calls in constant functions are limited to constant functions, tuple structs and tuple variants | 
|  | 62 | + | 
|  | 63 | +error: aborting due to 6 previous errors | 
|  | 64 | + | 
|  | 65 | +Some errors have detailed explanations: E0015, E0658. | 
|  | 66 | +For more information about an error, try `rustc --explain E0015`. | 
0 commit comments