summaryrefslogtreecommitdiffstats
path: root/tests/ui/consts/issue-25826.rs
diff options
context:
space:
mode:
Diffstat (limited to 'tests/ui/consts/issue-25826.rs')
-rw-r--r--tests/ui/consts/issue-25826.rs6
1 files changed, 6 insertions, 0 deletions
diff --git a/tests/ui/consts/issue-25826.rs b/tests/ui/consts/issue-25826.rs
new file mode 100644
index 000000000..c340c30a1
--- /dev/null
+++ b/tests/ui/consts/issue-25826.rs
@@ -0,0 +1,6 @@
+fn id<T>(t: T) -> T { t }
+fn main() {
+ const A: bool = unsafe { id::<u8> as *const () < id::<u16> as *const () };
+ //~^ ERROR can't compare
+ println!("{}", A);
+}