diff options
Diffstat (limited to 'src/test/ui/borrowck/reassignment_immutable_fields_overlapping.rs')
-rw-r--r-- | src/test/ui/borrowck/reassignment_immutable_fields_overlapping.rs | 16 |
1 files changed, 0 insertions, 16 deletions
diff --git a/src/test/ui/borrowck/reassignment_immutable_fields_overlapping.rs b/src/test/ui/borrowck/reassignment_immutable_fields_overlapping.rs deleted file mode 100644 index d7aad6c01..000000000 --- a/src/test/ui/borrowck/reassignment_immutable_fields_overlapping.rs +++ /dev/null @@ -1,16 +0,0 @@ -// This should never be allowed -- `foo.a` and `foo.b` are -// overlapping, so since `x` is not `mut` we should not permit -// reassignment. - -union Foo { - a: u32, - b: u32, -} - -unsafe fn overlapping_fields() { - let x: Foo; - x.a = 1; //~ ERROR - x.b = 22; //~ ERROR -} - -fn main() { } |