diff options
Diffstat (limited to 'tests/ui/issues/issue-25746-bool-transmute.rs')
-rw-r--r-- | tests/ui/issues/issue-25746-bool-transmute.rs | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/tests/ui/issues/issue-25746-bool-transmute.rs b/tests/ui/issues/issue-25746-bool-transmute.rs new file mode 100644 index 000000000..bc2f4a7c1 --- /dev/null +++ b/tests/ui/issues/issue-25746-bool-transmute.rs @@ -0,0 +1,11 @@ +// run-pass +use std::mem::transmute; + +fn main() { + unsafe { + let _: i8 = transmute(false); + let _: i8 = transmute(true); + let _: bool = transmute(0u8); + let _: bool = transmute(1u8); + } +} |