File tree Expand file tree Collapse file tree 5 files changed +56
-1
lines changed
Expand file tree Collapse file tree 5 files changed +56
-1
lines changed Original file line number Diff line number Diff line change 1+ error[E0508]: cannot move out of type `[NonCopy; 1]`, a non-copy array
2+ --> $DIR/E0508.rs:18:18
3+ |
4+ LL | let _value = array[0]; //[ast]~ ERROR [E0508]
5+ | ^^^^^^^^ cannot move out of here
6+
7+ error: aborting due to previous error
8+
9+ For more information about this error, try `rustc --explain E0508`.
Original file line number Diff line number Diff line change 1+ error[E0508]: cannot move out of type `[NonCopy; 1]`, a non-copy array
2+ --> $DIR/E0508.rs:18:18
3+ |
4+ LL | let _value = array[0]; //[ast]~ ERROR [E0508]
5+ | ^^^^^^^^
6+ | |
7+ | cannot move out of here
8+ | help: consider using a reference instead: `&array[0]`
9+
10+ error: aborting due to previous error
11+
12+ For more information about this error, try `rustc --explain E0508`.
Original file line number Diff line number Diff line change 1+ error[E0508]: cannot move out of type `[NonCopy; 1]`, a non-copy array
2+ --> $DIR/E0508.rs:18:18
3+ |
4+ LL | let _value = array[0]; //[ast]~ ERROR [E0508]
5+ | ^^^^^^^^ cannot move out of here
6+
7+ error: aborting due to previous error
8+
9+ For more information about this error, try `rustc --explain E0508`.
Original file line number Diff line number Diff line change 1+ // Copyright 2016 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.
4+ //
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.
10+
11+ // revisions: ast mir
12+ //[mir]compile-flags: -Z borrowck=mir
13+
14+ struct NonCopy ;
15+
16+ fn main ( ) {
17+ let array = [ NonCopy ; 1 ] ;
18+ let _value = array[ 0 ] ; //[ast]~ ERROR [E0508]
19+ //[mir]~^ ERROR [E0508]
20+ }
Original file line number Diff line number Diff line change @@ -2962,7 +2962,12 @@ impl<'test> TestCx<'test> {
29622962
29632963 let mut files = vec ! [ output_file] ;
29642964 if self . config . bless {
2965- files. push ( self . expected_output_path ( kind) ) ;
2965+ files. push ( expected_output_path (
2966+ self . testpaths ,
2967+ self . revision ,
2968+ & self . config . compare_mode ,
2969+ kind,
2970+ ) ) ;
29662971 }
29672972
29682973 for output_file in & files {
You can’t perform that action at this time.
0 commit comments