diff options
Diffstat (limited to 'src/test/ui/nll/reference-carried-through-struct-field.rs')
| -rw-r--r-- | src/test/ui/nll/reference-carried-through-struct-field.rs | 10 |
1 files changed, 0 insertions, 10 deletions
diff --git a/src/test/ui/nll/reference-carried-through-struct-field.rs b/src/test/ui/nll/reference-carried-through-struct-field.rs deleted file mode 100644 index effd6108499..00000000000 --- a/src/test/ui/nll/reference-carried-through-struct-field.rs +++ /dev/null @@ -1,10 +0,0 @@ -struct Wrap<'a> { w: &'a mut u32 } - -fn foo() { - let mut x = 22; - let wrapper = Wrap { w: &mut x }; - x += 1; //~ ERROR cannot use `x` because it was mutably borrowed [E0503] - *wrapper.w += 1; -} - -fn main() { } |
