]>
Commit | Line | Data |
---|---|---|
064997fb FG |
1 | error[E0277]: can't compare `*const ()` with `*const ()` in const contexts |
2 | --> $DIR/issue-25826.rs:3:52 | |
b7449926 | 3 | | |
9fa01778 | 4 | LL | const A: bool = unsafe { id::<u8> as *const () < id::<u16> as *const () }; |
064997fb | 5 | | ^ no implementation for `*const () < *const ()` and `*const () > *const ()` |
b7449926 | 6 | | |
064997fb FG |
7 | = help: the trait `~const PartialOrd` is not implemented for `*const ()` |
8 | note: the trait `PartialOrd` is implemented for `*const ()`, but that implementation is not `const` | |
9 | --> $DIR/issue-25826.rs:3:52 | |
10 | | | |
11 | LL | const A: bool = unsafe { id::<u8> as *const () < id::<u16> as *const () }; | |
12 | | ^ | |
13 | help: consider introducing a `where` clause, but there might be an alternative better way to express this requirement | |
14 | | | |
15 | LL | fn main() where *const (): ~const PartialOrd { | |
16 | | ++++++++++++++++++++++++++++++++++ | |
b7449926 XL |
17 | |
18 | error: aborting due to previous error | |
19 | ||
064997fb | 20 | For more information about this error, try `rustc --explain E0277`. |