rust/tests/ui/consts/issue-25826.stderr

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

17 lines
794 B
Plaintext
Raw Normal View History

2022-07-25 08:17:00 +00:00
error[E0277]: can't compare `*const ()` with `*const ()` in const contexts
--> $DIR/issue-25826.rs:3:52
|
LL | const A: bool = unsafe { id::<u8> as *const () < id::<u16> as *const () };
2022-07-25 08:17:00 +00:00
| ^ no implementation for `*const () < *const ()` and `*const () > *const ()`
|
2022-07-25 08:17:00 +00:00
= help: the trait `~const PartialOrd` is not implemented for `*const ()`
note: the trait `PartialOrd` is implemented for `*const ()`, but that implementation is not `const`
--> $DIR/issue-25826.rs:3:52
|
LL | const A: bool = unsafe { id::<u8> as *const () < id::<u16> as *const () };
| ^
error: aborting due to previous error
2022-07-25 08:17:00 +00:00
For more information about this error, try `rustc --explain E0277`.