diff options
Diffstat (limited to 'src/test/ui/rfc-2632-const-trait-impl/call-generic-method-nonconst.stderr')
-rw-r--r-- | src/test/ui/rfc-2632-const-trait-impl/call-generic-method-nonconst.stderr | 21 |
1 files changed, 8 insertions, 13 deletions
diff --git a/src/test/ui/rfc-2632-const-trait-impl/call-generic-method-nonconst.stderr b/src/test/ui/rfc-2632-const-trait-impl/call-generic-method-nonconst.stderr index 0a2a5f0f2..706f52343 100644 --- a/src/test/ui/rfc-2632-const-trait-impl/call-generic-method-nonconst.stderr +++ b/src/test/ui/rfc-2632-const-trait-impl/call-generic-method-nonconst.stderr @@ -1,26 +1,21 @@ -error[E0277]: can't compare `S` with `S` in const contexts - --> $DIR/call-generic-method-nonconst.rs:18:34 +error[E0277]: the trait bound `S: ~const Foo` is not satisfied + --> $DIR/call-generic-method-nonconst.rs:23:34 | LL | pub const EQ: bool = equals_self(&S); - | ----------- ^^ no implementation for `S == S` + | ----------- ^^ the trait `~const Foo` is not implemented for `S` | | | required by a bound introduced by this call | - = help: the trait `~const PartialEq` is not implemented for `S` -note: the trait `PartialEq` is implemented for `S`, but that implementation is not `const` - --> $DIR/call-generic-method-nonconst.rs:18:34 +note: the trait `Foo` is implemented for `S`, but that implementation is not `const` + --> $DIR/call-generic-method-nonconst.rs:23:34 | LL | pub const EQ: bool = equals_self(&S); | ^^ note: required by a bound in `equals_self` - --> $DIR/call-generic-method-nonconst.rs:11:25 - | -LL | const fn equals_self<T: ~const PartialEq>(t: &T) -> bool { - | ^^^^^^^^^^^^^^^^ required by this bound in `equals_self` -help: consider annotating `S` with `#[derive(PartialEq)]` - | -LL | #[derive(PartialEq)] + --> $DIR/call-generic-method-nonconst.rs:16:25 | +LL | const fn equals_self<T: ~const Foo>(t: &T) -> bool { + | ^^^^^^^^^^ required by this bound in `equals_self` error: aborting due to previous error |