mirror of https://github.com/rust-lang/rust.git
55 lines
1.6 KiB
Plaintext
55 lines
1.6 KiB
Plaintext
error: `~const` is not allowed here
|
|
--> const-super-trait.rs:7:12
|
|
|
|
|
7 | trait Bar: ~const Foo {}
|
|
| ^^^^^^
|
|
|
|
|
note: this trait is not a `#[const_trait]`, so it cannot have `~const` trait bounds
|
|
--> const-super-trait.rs:7:1
|
|
|
|
|
7 | trait Bar: ~const Foo {}
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^
|
|
|
|
error[E0554]: `#![feature]` may not be used on the NIGHTLY release channel
|
|
--> const-super-trait.rs:1:30
|
|
|
|
|
1 | #![cfg_attr(feature_enabled, feature(const_trait_impl))]
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^
|
|
|
|
error: `~const` can only be applied to `#[const_trait]` traits
|
|
--> const-super-trait.rs:7:12
|
|
|
|
|
7 | trait Bar: ~const Foo {}
|
|
| ^^^^^^ can't be applied to `Foo`
|
|
|
|
|
note: `Foo` can't be used with `~const` because it isn't annotated with `#[const_trait]`
|
|
--> const-super-trait.rs:3:1
|
|
|
|
|
3 | trait Foo {
|
|
| ^^^^^^^^^
|
|
|
|
error: `~const` can only be applied to `#[const_trait]` traits
|
|
--> const-super-trait.rs:9:17
|
|
|
|
|
9 | const fn foo<T: ~const Bar>(x: &T) {
|
|
| ^^^^^^ can't be applied to `Bar`
|
|
|
|
|
note: `Bar` can't be used with `~const` because it isn't annotated with `#[const_trait]`
|
|
--> const-super-trait.rs:7:1
|
|
|
|
|
7 | trait Bar: ~const Foo {}
|
|
| ^^^^^^^^^^^^^^^^^^^^^
|
|
|
|
error[E0015]: cannot call non-const method `<T as Foo>::a` in constant functions
|
|
--> const-super-trait.rs:10:7
|
|
|
|
|
10 | x.a();
|
|
| ^^^
|
|
|
|
|
= note: calls in constant functions are limited to constant functions, tuple structs and tuple variants
|
|
|
|
error: aborting due to 5 previous errors
|
|
|
|
Some errors have detailed explanations: E0015, E0554.
|
|
For more information about an error, try `rustc --explain E0015`.
|