1
- error[E0277]: can't compare `TypeId` with `TypeId` in const contexts
2
- --> $DIR/const_cmp_type_id.rs:8:13
3
- |
4
- LL | assert!(TypeId::of::<u8>() == TypeId::of::<u8>());
5
- | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ no implementation for `TypeId == TypeId`
6
- |
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/const_cmp_type_id.rs:8:13
10
- |
11
- LL | assert!(TypeId::of::<u8>() == TypeId::of::<u8>());
12
- | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
13
-
14
1
error[E0015]: cannot call non-const operator in constant functions
15
2
--> $DIR/const_cmp_type_id.rs:8:13
16
3
|
@@ -21,19 +8,6 @@ note: impl defined here, but it is not `const`
21
8
--> $SRC_DIR/core/src/any.rs:LL:COL
22
9
= note: calls in constant functions are limited to constant functions, tuple structs and tuple variants
23
10
24
- error[E0277]: can't compare `TypeId` with `TypeId` in const contexts
25
- --> $DIR/const_cmp_type_id.rs:9:13
26
- |
27
- LL | assert!(TypeId::of::<()>() != TypeId::of::<u8>());
28
- | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ no implementation for `TypeId == TypeId`
29
- |
30
- = help: the trait `~const PartialEq` is not implemented for `TypeId`
31
- note: the trait `PartialEq` is implemented for `TypeId`, but that implementation is not `const`
32
- --> $DIR/const_cmp_type_id.rs:9:13
33
- |
34
- LL | assert!(TypeId::of::<()>() != TypeId::of::<u8>());
35
- | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
36
-
37
11
error[E0015]: cannot call non-const operator in constant functions
38
12
--> $DIR/const_cmp_type_id.rs:9:13
39
13
|
@@ -44,19 +18,6 @@ note: impl defined here, but it is not `const`
44
18
--> $SRC_DIR/core/src/any.rs:LL:COL
45
19
= note: calls in constant functions are limited to constant functions, tuple structs and tuple variants
46
20
47
- error[E0277]: can't compare `TypeId` with `TypeId` in const contexts
48
- --> $DIR/const_cmp_type_id.rs:10:22
49
- |
50
- LL | const _A: bool = TypeId::of::<u8>() < TypeId::of::<u16>();
51
- | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ no implementation for `TypeId < TypeId` and `TypeId > TypeId`
52
- |
53
- = help: the trait `~const PartialOrd` is not implemented for `TypeId`
54
- note: the trait `PartialOrd` is implemented for `TypeId`, but that implementation is not `const`
55
- --> $DIR/const_cmp_type_id.rs:10:22
56
- |
57
- LL | const _A: bool = TypeId::of::<u8>() < TypeId::of::<u16>();
58
- | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
59
-
60
21
error[E0015]: cannot call non-const operator in constants
61
22
--> $DIR/const_cmp_type_id.rs:10:22
62
23
|
@@ -68,7 +29,6 @@ note: impl defined here, but it is not `const`
68
29
= note: calls in constants are limited to constant functions, tuple structs and tuple variants
69
30
= note: this error originates in the derive macro `PartialOrd` (in Nightly builds, run with -Z macro-backtrace for more info)
70
31
71
- error: aborting due to 6 previous errors
32
+ error: aborting due to 3 previous errors
72
33
73
- Some errors have detailed explanations: E0015, E0277.
74
- For more information about an error, try `rustc --explain E0015`.
34
+ For more information about this error, try `rustc --explain E0015`.
0 commit comments