31 lines
835 B
Plaintext
31 lines
835 B
Plaintext
error: `~const` is not allowed here
|
|
--> $DIR/super-traits-fail-3.rs:12:12
|
|
|
|
|
LL | trait Bar: ~const Foo {}
|
|
| ^^^^^^
|
|
|
|
|
note: this trait is not a `#[const_trait]`, so it cannot have `~const` trait bounds
|
|
--> $DIR/super-traits-fail-3.rs:12:1
|
|
|
|
|
LL | trait Bar: ~const Foo {}
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^
|
|
|
|
error: `~const` can only be applied to `#[const_trait]` traits
|
|
--> $DIR/super-traits-fail-3.rs:18:24
|
|
|
|
|
LL | const fn foo<T: ~const Bar>(x: &T) {
|
|
| ^^^
|
|
|
|
error[E0308]: mismatched types
|
|
--> $DIR/super-traits-fail-3.rs:20:5
|
|
|
|
|
LL | x.a();
|
|
| ^^^^^ expected `host`, found `true`
|
|
|
|
|
= note: expected constant `host`
|
|
found constant `true`
|
|
|
|
error: aborting due to 3 previous errors
|
|
|
|
For more information about this error, try `rustc --explain E0308`.
|