|
1 |
| -error[E0277]: can't compare `S` with `S` in const contexts |
2 |
| - --> $DIR/call-generic-method-nonconst.rs:18:34 |
| 1 | +error[E0277]: the trait bound `S: ~const Foo` is not satisfied |
| 2 | + --> $DIR/call-generic-method-nonconst.rs:23:34 |
3 | 3 | |
|
4 | 4 | LL | pub const EQ: bool = equals_self(&S);
|
5 |
| - | ----------- ^^ no implementation for `S == S` |
| 5 | + | ----------- ^^ the trait `~const Foo` is not implemented for `S` |
6 | 6 | | |
|
7 | 7 | | required by a bound introduced by this call
|
8 | 8 | |
|
9 |
| - = help: the trait `~const PartialEq` is not implemented for `S` |
10 |
| -note: the trait `PartialEq` is implemented for `S`, but that implementation is not `const` |
11 |
| - --> $DIR/call-generic-method-nonconst.rs:18:34 |
| 9 | +note: the trait `Foo` is implemented for `S`, but that implementation is not `const` |
| 10 | + --> $DIR/call-generic-method-nonconst.rs:23:34 |
12 | 11 | |
|
13 | 12 | LL | pub const EQ: bool = equals_self(&S);
|
14 | 13 | | ^^
|
15 | 14 | note: required by a bound in `equals_self`
|
16 |
| - --> $DIR/call-generic-method-nonconst.rs:11:25 |
17 |
| - | |
18 |
| -LL | const fn equals_self<T: ~const PartialEq>(t: &T) -> bool { |
19 |
| - | ^^^^^^^^^^^^^^^^ required by this bound in `equals_self` |
20 |
| -help: consider annotating `S` with `#[derive(PartialEq)]` |
21 |
| - | |
22 |
| -LL | #[derive(PartialEq)] |
| 15 | + --> $DIR/call-generic-method-nonconst.rs:16:25 |
23 | 16 | |
|
| 17 | +LL | const fn equals_self<T: ~const Foo>(t: &T) -> bool { |
| 18 | + | ^^^^^^^^^^ required by this bound in `equals_self` |
24 | 19 |
|
25 | 20 | error: aborting due to previous error
|
26 | 21 |
|
|
0 commit comments