diff options
Diffstat (limited to 'src/test/ui/unsafe/access_union_field.rs')
-rw-r--r-- | src/test/ui/unsafe/access_union_field.rs | 15 |
1 files changed, 0 insertions, 15 deletions
diff --git a/src/test/ui/unsafe/access_union_field.rs b/src/test/ui/unsafe/access_union_field.rs deleted file mode 100644 index 5c4e695df..000000000 --- a/src/test/ui/unsafe/access_union_field.rs +++ /dev/null @@ -1,15 +0,0 @@ -// revisions: mir thir -// [thir]compile-flags: -Z thir-unsafeck - -#![allow(unused_variables)] - -union Foo { - bar: i8, - baz: u8, -} - -fn main() { - let foo = Foo { bar: 5 }; - let a = foo.bar; //~ ERROR access to union field is unsafe and requires unsafe function or block - let b = foo.baz; //~ ERROR access to union field is unsafe and requires unsafe function or block -} |