]> git.lizzy.rs Git - rust.git/blob - src/test/ui/consts/issue-25826.stderr
Rollup merge of #99479 - Enselic:import-can-be-without-id, r=camelid
[rust.git] / src / test / ui / consts / issue-25826.stderr
1 error[E0277]: can't compare `*const ()` with `*const ()` in const contexts
2   --> $DIR/issue-25826.rs:3:52
3    |
4 LL |     const A: bool = unsafe { id::<u8> as *const () < id::<u16> as *const () };
5    |                                                    ^ no implementation for `*const () < *const ()` and `*const () > *const ()`
6    |
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    |           ++++++++++++++++++++++++++++++++++
17
18 error: aborting due to previous error
19
20 For more information about this error, try `rustc --explain E0277`.