blob: 873c57ec71ffe197267b1fee4860f66086f6c365 [file] [log] [blame] [edit]
error: `~const` is not allowed here
--> $DIR/super-traits-fail-2.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-2.rs:12:1
|
LL | trait Bar: ~const Foo {}
| ^^^^^^^^^^^^^^^^^^^^^^^^
error[E0277]: the trait bound `T: ~const Foo` is not satisfied
--> $DIR/super-traits-fail-2.rs:19:7
|
LL | x.a();
| ^ the trait `Foo` is not implemented for `T`
|
note: required by a bound in `Foo::a`
--> $DIR/super-traits-fail-2.rs:6:25
|
LL | #[cfg_attr(any(yy, yn), const_trait)]
| ^^^^^^^^^^^ required by this bound in `Foo::a`
LL | trait Foo {
LL | fn a(&self);
| - required by a bound in this associated function
help: consider further restricting this bound
|
LL | const fn foo<T: Bar + Foo>(x: &T) {
| +++++
error: aborting due to 2 previous errors
For more information about this error, try `rustc --explain E0277`.