diff options
Diffstat (limited to 'src/test/ui/nll/loan_ends_mid_block_vec.rs')
-rw-r--r-- | src/test/ui/nll/loan_ends_mid_block_vec.rs | 30 |
1 files changed, 0 insertions, 30 deletions
diff --git a/src/test/ui/nll/loan_ends_mid_block_vec.rs b/src/test/ui/nll/loan_ends_mid_block_vec.rs deleted file mode 100644 index 2edcdef0a..000000000 --- a/src/test/ui/nll/loan_ends_mid_block_vec.rs +++ /dev/null @@ -1,30 +0,0 @@ -#![allow(warnings)] -#![feature(rustc_attrs)] - -fn main() { -} - -fn nll_fail() { - let mut data = vec!['a', 'b', 'c']; - let slice = &mut data; - capitalize(slice); - data.push('d'); - //~^ ERROR [E0499] - data.push('e'); - //~^ ERROR [E0499] - data.push('f'); - //~^ ERROR [E0499] - capitalize(slice); -} - -fn nll_ok() { - let mut data = vec!['a', 'b', 'c']; - let slice = &mut data; - capitalize(slice); - data.push('d'); - data.push('e'); - data.push('f'); -} - -fn capitalize(_: &mut [char]) { -} |