diff options
Diffstat (limited to 'src/test/ui/consts/const-cast-wrong-type.rs')
-rw-r--r-- | src/test/ui/consts/const-cast-wrong-type.rs | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/test/ui/consts/const-cast-wrong-type.rs b/src/test/ui/consts/const-cast-wrong-type.rs new file mode 100644 index 000000000..6e055a2bc --- /dev/null +++ b/src/test/ui/consts/const-cast-wrong-type.rs @@ -0,0 +1,5 @@ +const a: [u8; 3] = ['h' as u8, 'i' as u8, 0 as u8]; +const b: *const i8 = &a as *const i8; //~ ERROR mismatched types + +fn main() { +} |