|
1 | | -error[E0015]: cannot call non-const operator in constant functions |
| 1 | +error[E0131]: `main` function is not allowed to have generic parameters |
| 2 | + --> $DIR/const_cmp_type_id.rs:7:14 |
| 3 | + | |
| 4 | +LL | const fn main() { |
| 5 | + | ^ `main` cannot have generic parameters |
| 6 | + |
| 7 | +error[E0308]: mismatched types |
2 | 8 | --> $DIR/const_cmp_type_id.rs:8:13 |
3 | 9 | | |
4 | 10 | LL | assert!(TypeId::of::<u8>() == TypeId::of::<u8>()); |
5 | | - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ |
| 11 | + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected `host`, found `true` |
6 | 12 | | |
7 | | -note: impl defined here, but it is not `const` |
8 | | - --> $SRC_DIR/core/src/any.rs:LL:COL |
9 | | - = note: calls in constant functions are limited to constant functions, tuple structs and tuple variants |
| 13 | + = note: expected constant `host` |
| 14 | + found constant `true` |
10 | 15 |
|
11 | | -error[E0015]: cannot call non-const operator in constant functions |
| 16 | +error[E0308]: mismatched types |
12 | 17 | --> $DIR/const_cmp_type_id.rs:9:13 |
13 | 18 | | |
14 | 19 | LL | assert!(TypeId::of::<()>() != TypeId::of::<u8>()); |
15 | | - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ |
16 | | - | |
17 | | -note: impl defined here, but it is not `const` |
18 | | - --> $SRC_DIR/core/src/any.rs:LL:COL |
19 | | - = note: calls in constant functions are limited to constant functions, tuple structs and tuple variants |
20 | | - |
21 | | -error[E0015]: cannot call non-const operator in constants |
22 | | - --> $DIR/const_cmp_type_id.rs:10:22 |
23 | | - | |
24 | | -LL | const _A: bool = TypeId::of::<u8>() < TypeId::of::<u16>(); |
25 | | - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ |
| 20 | + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected `host`, found `true` |
26 | 21 | | |
27 | | -note: impl defined here, but it is not `const` |
28 | | - --> $SRC_DIR/core/src/any.rs:LL:COL |
29 | | - = note: calls in constants are limited to constant functions, tuple structs and tuple variants |
30 | | - = note: this error originates in the derive macro `PartialOrd` (in Nightly builds, run with -Z macro-backtrace for more info) |
| 22 | + = note: expected constant `host` |
| 23 | + found constant `true` |
31 | 24 |
|
32 | 25 | error: aborting due to 3 previous errors |
33 | 26 |
|
34 | | -For more information about this error, try `rustc --explain E0015`. |
| 27 | +Some errors have detailed explanations: E0131, E0308. |
| 28 | +For more information about an error, try `rustc --explain E0131`. |
0 commit comments