]>
git.proxmox.com Git - rustc.git/blob - src/test/compile-fail/nll/loan_ends_mid_block_vec.rs
1 // Copyright 2012 The Rust Project Developers. See the COPYRIGHT
2 // file at the top-level directory of this distribution and at
3 // http://rust-lang.org/COPYRIGHT.
5 // Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
6 // http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
7 // <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
8 // option. This file may not be copied, modified, or distributed
9 // except according to those terms.
12 // compile-flags:-Zborrowck-mir -Znll
15 #![feature(rustc_attrs)]
21 let mut data
= vec
!['a'
, 'b'
, 'c'
];
22 let slice
= &mut data
;
25 //~^ ERROR (Ast) [E0499]
26 //~| ERROR (Mir) [E0499]
28 //~^ ERROR (Ast) [E0499]
29 //~| ERROR (Mir) [E0499]
31 //~^ ERROR (Ast) [E0499]
32 //~| ERROR (Mir) [E0499]
37 let mut data
= vec
!['a'
, 'b'
, 'c'
];
38 let slice
= &mut data
;
41 //~^ ERROR (Ast) [E0499]
43 //~^ ERROR (Ast) [E0499]
45 //~^ ERROR (Ast) [E0499]
48 fn capitalize(_
: &mut [char]) {