|
1 |
| -error: overly complex generic constant |
2 |
| - --> $DIR/issue-90318.rs:14:8 |
| 1 | +error[E0277]: can't compare `TypeId` with `_` in const contexts |
| 2 | + --> $DIR/issue-90318.rs:14:28 |
3 | 3 | |
|
4 | 4 | LL | If<{ TypeId::of::<T>() != TypeId::of::<()>() }>: True,
|
5 |
| - | ^^-----------------^^^^^^^^^^^^^^^^^^^^^^^^ |
6 |
| - | | |
7 |
| - | borrowing is not supported in generic constants |
| 5 | + | ^^ no implementation for `TypeId == _` |
8 | 6 | |
|
9 |
| - = help: consider moving this anonymous constant into a `const` function |
10 |
| - = note: this operation may be supported in the future |
11 |
| - |
12 |
| -error[E0015]: cannot call non-const operator in constants |
13 |
| - --> $DIR/issue-90318.rs:14:10 |
| 7 | + = help: the trait `~const PartialEq<_>` is not implemented for `TypeId` |
| 8 | +note: the trait `PartialEq<_>` is implemented for `TypeId`, but that implementation is not `const` |
| 9 | + --> $DIR/issue-90318.rs:14:28 |
14 | 10 | |
|
15 | 11 | LL | If<{ TypeId::of::<T>() != TypeId::of::<()>() }>: True,
|
16 |
| - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ |
17 |
| - | |
18 |
| -note: impl defined here, but it is not `const` |
19 |
| - --> $SRC_DIR/core/src/any.rs:LL:COL |
20 |
| - | |
21 |
| -LL | #[derive(Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Debug, Hash)] |
22 |
| - | ^^^^^^^^^ |
23 |
| - = note: calls in constants are limited to constant functions, tuple structs and tuple variants |
24 |
| - = note: this error originates in the derive macro `PartialEq` (in Nightly builds, run with -Z macro-backtrace for more info) |
| 12 | + | ^^ |
25 | 13 |
|
26 |
| -error: overly complex generic constant |
27 |
| - --> $DIR/issue-90318.rs:22:8 |
| 14 | +error[E0277]: can't compare `TypeId` with `_` in const contexts |
| 15 | + --> $DIR/issue-90318.rs:21:28 |
28 | 16 | |
|
29 | 17 | LL | If<{ TypeId::of::<T>() != TypeId::of::<()>() }>: True,
|
30 |
| - | ^^-----------------^^^^^^^^^^^^^^^^^^^^^^^^ |
31 |
| - | | |
32 |
| - | borrowing is not supported in generic constants |
| 18 | + | ^^ no implementation for `TypeId == _` |
33 | 19 | |
|
34 |
| - = help: consider moving this anonymous constant into a `const` function |
35 |
| - = note: this operation may be supported in the future |
36 |
| - |
37 |
| -error[E0015]: cannot call non-const operator in constants |
38 |
| - --> $DIR/issue-90318.rs:22:10 |
| 20 | + = help: the trait `~const PartialEq<_>` is not implemented for `TypeId` |
| 21 | +note: the trait `PartialEq<_>` is implemented for `TypeId`, but that implementation is not `const` |
| 22 | + --> $DIR/issue-90318.rs:21:28 |
39 | 23 | |
|
40 | 24 | LL | If<{ TypeId::of::<T>() != TypeId::of::<()>() }>: True,
|
41 |
| - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ |
42 |
| - | |
43 |
| -note: impl defined here, but it is not `const` |
44 |
| - --> $SRC_DIR/core/src/any.rs:LL:COL |
45 |
| - | |
46 |
| -LL | #[derive(Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Debug, Hash)] |
47 |
| - | ^^^^^^^^^ |
48 |
| - = note: calls in constants are limited to constant functions, tuple structs and tuple variants |
49 |
| - = note: this error originates in the derive macro `PartialEq` (in Nightly builds, run with -Z macro-backtrace for more info) |
| 25 | + | ^^ |
50 | 26 |
|
51 |
| -error: aborting due to 4 previous errors |
| 27 | +error: aborting due to 2 previous errors |
52 | 28 |
|
53 |
| -For more information about this error, try `rustc --explain E0015`. |
| 29 | +For more information about this error, try `rustc --explain E0277`. |
0 commit comments