diff options
Diffstat (limited to 'src/test/ui/consts/issue-25826.stderr')
-rw-r--r-- | src/test/ui/consts/issue-25826.stderr | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/src/test/ui/consts/issue-25826.stderr b/src/test/ui/consts/issue-25826.stderr new file mode 100644 index 000000000..b80befa26 --- /dev/null +++ b/src/test/ui/consts/issue-25826.stderr @@ -0,0 +1,20 @@ +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 () }; + | ^ no implementation for `*const () < *const ()` and `*const () > *const ()` + | + = 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 () }; + | ^ +help: consider introducing a `where` clause, but there might be an alternative better way to express this requirement + | +LL | fn main() where *const (): ~const PartialOrd { + | ++++++++++++++++++++++++++++++++++ + +error: aborting due to previous error + +For more information about this error, try `rustc --explain E0277`. |