]>
Commit | Line | Data |
---|---|---|
064997fb FG |
1 | error[E0277]: can't compare `*const i32` with `_` in const contexts |
2 | --> $DIR/const_raw_ptr_ops.rs:4:43 | |
b7449926 | 3 | | |
532ac7d7 | 4 | LL | const X: bool = unsafe { &1 as *const i32 == &2 as *const i32 }; |
064997fb | 5 | | ^^ no implementation for `*const i32 == _` |
b7449926 | 6 | | |
064997fb FG |
7 | = help: the trait `~const PartialEq<_>` is not implemented for `*const i32` |
8 | note: the trait `PartialEq<_>` is implemented for `*const i32`, but that implementation is not `const` | |
9 | --> $DIR/const_raw_ptr_ops.rs:4:43 | |
10 | | | |
11 | LL | const X: bool = unsafe { &1 as *const i32 == &2 as *const i32 }; | |
12 | | ^^ | |
13 | = help: the following other types implement trait `PartialEq<Rhs>`: | |
14 | f32 | |
15 | f64 | |
16 | i128 | |
17 | i16 | |
18 | i32 | |
19 | i64 | |
20 | i8 | |
21 | isize | |
22 | and 6 others | |
416331ca | 23 | |
064997fb FG |
24 | error[E0277]: can't compare `*const i32` with `_` in const contexts |
25 | --> $DIR/const_raw_ptr_ops.rs:6:44 | |
416331ca XL |
26 | | |
27 | LL | const X2: bool = unsafe { 42 as *const i32 == 43 as *const i32 }; | |
064997fb | 28 | | ^^ no implementation for `*const i32 == _` |
b7449926 | 29 | | |
064997fb FG |
30 | = help: the trait `~const PartialEq<_>` is not implemented for `*const i32` |
31 | note: the trait `PartialEq<_>` is implemented for `*const i32`, but that implementation is not `const` | |
32 | --> $DIR/const_raw_ptr_ops.rs:6:44 | |
33 | | | |
34 | LL | const X2: bool = unsafe { 42 as *const i32 == 43 as *const i32 }; | |
35 | | ^^ | |
36 | = help: the following other types implement trait `PartialEq<Rhs>`: | |
37 | f32 | |
38 | f64 | |
39 | i128 | |
40 | i16 | |
41 | i32 | |
42 | i64 | |
43 | i8 | |
44 | isize | |
45 | and 6 others | |
b7449926 | 46 | |
f035d41b | 47 | error: aborting due to 2 previous errors |
b7449926 | 48 | |
064997fb | 49 | For more information about this error, try `rustc --explain E0277`. |