diff options
Diffstat (limited to 'tests/ui/rfcs/rfc-2632-const-trait-impl/super-traits-fail-2.yn.stderr')
-rw-r--r-- | tests/ui/rfcs/rfc-2632-const-trait-impl/super-traits-fail-2.yn.stderr | 17 |
1 files changed, 10 insertions, 7 deletions
diff --git a/tests/ui/rfcs/rfc-2632-const-trait-impl/super-traits-fail-2.yn.stderr b/tests/ui/rfcs/rfc-2632-const-trait-impl/super-traits-fail-2.yn.stderr index 5d34156a5..e465ebaff 100644 --- a/tests/ui/rfcs/rfc-2632-const-trait-impl/super-traits-fail-2.yn.stderr +++ b/tests/ui/rfcs/rfc-2632-const-trait-impl/super-traits-fail-2.yn.stderr @@ -1,11 +1,14 @@ -error[E0015]: cannot call non-const fn `<T as Foo>::a` in constant functions - --> $DIR/super-traits-fail-2.rs:16:7 +error: `~const` is not allowed here + --> $DIR/super-traits-fail-2.rs:11:12 | -LL | x.a(); - | ^^^ +LL | trait Bar: ~const Foo {} + | ^^^^^^ | - = note: calls in constant functions are limited to constant functions, tuple structs and tuple variants +note: this trait is not a `#[const_trait]`, so it cannot have `~const` trait bounds + --> $DIR/super-traits-fail-2.rs:11:1 + | +LL | trait Bar: ~const Foo {} + | ^^^^^^^^^^^^^^^^^^^^^^^^ -error: aborting due to previous error +error: aborting due to 1 previous error -For more information about this error, try `rustc --explain E0015`. |