diff --git a/charon/tests/ui/pointers-in-consts.out b/charon/tests/ui/pointers-in-consts.out new file mode 100644 index 00000000..32e858f3 --- /dev/null +++ b/charon/tests/ui/pointers-in-consts.out @@ -0,0 +1,9 @@ +error: Unsupported constant: `ConstantExprKind::Cast {..}` + --> tests/ui/pointers-in-consts.rs:6:9 + | +6 | DISGUISED_INT => {} + | ^^^^^^^^^^^^^ + +error: aborting due to 1 previous error + +ERROR Compilation encountered 1 errors diff --git a/charon/tests/ui/pointers-in-consts.rs b/charon/tests/ui/pointers-in-consts.rs new file mode 100644 index 00000000..caf7e792 --- /dev/null +++ b/charon/tests/ui/pointers-in-consts.rs @@ -0,0 +1,9 @@ +//@ known-failure +const DISGUISED_INT: *const () = 42 as _; + +fn bar() { + match 43 as *const () { + DISGUISED_INT => {} + _ => {} + } +}