Skip to content

Commit 74bfd94

Browse files
committed
bless also produces .nll files now
1 parent 0356a61 commit 74bfd94

File tree

5 files changed

+56
-1
lines changed

5 files changed

+56
-1
lines changed

src/test/ui/E0508.ast.nll.stderr

+9
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
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`.

src/test/ui/E0508.ast.stderr

+12
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
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`.

src/test/ui/E0508.mir.stderr

+9
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
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`.

src/test/ui/E0508.rs

+20
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
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+
}

src/tools/compiletest/src/runtest.rs

+6-1
Original file line numberDiff line numberDiff 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 {

0 commit comments

Comments
 (0)