|
1 |
| -error[E0277]: can't compare `TypeId` with `_` in const contexts |
2 |
| - --> $DIR/issue-90318.rs:14:28 |
| 1 | +error: overly complex generic constant |
| 2 | + --> $DIR/issue-90318.rs:14:8 |
3 | 3 | |
|
4 | 4 | LL | If<{ TypeId::of::<T>() != TypeId::of::<()>() }>: True,
|
5 |
| - | ^^ no implementation for `TypeId == _` |
| 5 | + | ^^-----------------^^^^^^^^^^^^^^^^^^^^^^^^ |
| 6 | + | | |
| 7 | + | borrowing is not supported in generic constants |
6 | 8 | |
|
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 |
10 |
| - | |
11 |
| -LL | If<{ TypeId::of::<T>() != TypeId::of::<()>() }>: True, |
12 |
| - | ^^ |
| 9 | + = help: consider moving this anonymous constant into a `const` function |
| 10 | + = note: this operation may be supported in the future |
13 | 11 |
|
14 |
| -error[E0277]: can't compare `TypeId` with `_` in const contexts |
15 |
| - --> $DIR/issue-90318.rs:21:28 |
| 12 | +error: overly complex generic constant |
| 13 | + --> $DIR/issue-90318.rs:21:8 |
16 | 14 | |
|
17 | 15 | LL | If<{ TypeId::of::<T>() != TypeId::of::<()>() }>: True,
|
18 |
| - | ^^ no implementation for `TypeId == _` |
| 16 | + | ^^-----------------^^^^^^^^^^^^^^^^^^^^^^^^ |
| 17 | + | | |
| 18 | + | borrowing is not supported in generic constants |
19 | 19 | |
|
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 |
23 |
| - | |
24 |
| -LL | If<{ TypeId::of::<T>() != TypeId::of::<()>() }>: True, |
25 |
| - | ^^ |
| 20 | + = help: consider moving this anonymous constant into a `const` function |
| 21 | + = note: this operation may be supported in the future |
26 | 22 |
|
27 | 23 | error: aborting due to 2 previous errors
|
28 | 24 |
|
29 |
| -For more information about this error, try `rustc --explain E0277`. |
0 commit comments