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