Skip to content

Commit

Permalink
updates to expected output for other ui tests.
Browse files Browse the repository at this point in the history
  • Loading branch information
pnkfelix committed Oct 16, 2018
1 parent b10beb3 commit 5b74843
Show file tree
Hide file tree
Showing 10 changed files with 24 additions and 11 deletions.
2 changes: 1 addition & 1 deletion src/test/ui/issues/issue-17385.nll.stderr
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
error[E0382]: use of moved value: `foo.0`
error[E0382]: use of moved value: `foo`
--> $DIR/issue-17385.rs:29:11
|
LL | drop(foo);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ fn main() {
_ if { (|| { let bar = b; *bar = false; })();
false } => { },
&mut true => { println!("You might think we should get here"); },
//~^ ERROR use of moved value: `*b` [E0382]
//~^ ERROR use of moved value: `b` [E0382]
_ => panic!("surely we could never get here, since rustc warns it is unreachable."),
}
}
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
error[E0382]: use of moved value: `*b`
error[E0382]: use of moved value: `b`
--> $DIR/issue-27282-move-match-input-into-guard.rs:28:14
|
LL | _ if { (|| { let bar = b; *bar = false; })();
Expand Down
2 changes: 1 addition & 1 deletion src/test/ui/liveness/liveness-use-after-move.nll.stderr
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
error[E0382]: borrow of moved value: `*x`
error[E0382]: borrow of moved value: `x`
--> $DIR/liveness-use-after-move.rs:16:20
|
LL | let y = x;
Expand Down
2 changes: 1 addition & 1 deletion src/test/ui/nll/issue-51512.rs
Original file line number Diff line number Diff line change
Expand Up @@ -15,5 +15,5 @@ fn main() {
let range = 0..1;
let r = range;
let x = range.start;
//~^ ERROR use of moved value: `range.start` [E0382]
//~^ ERROR use of moved value: `range` [E0382]
}
2 changes: 1 addition & 1 deletion src/test/ui/nll/issue-51512.stderr
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
error[E0382]: use of moved value: `range.start`
error[E0382]: use of moved value: `range`
--> $DIR/issue-51512.rs:17:13
|
LL | let r = range;
Expand Down
6 changes: 3 additions & 3 deletions src/test/ui/union/union-borrow-move-parent-sibling.nll.stderr
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
error[E0382]: use of moved value: `u.y`
error[E0382]: use of moved value: `u`
--> $DIR/union-borrow-move-parent-sibling.rs:29:13
|
LL | let a = u.x.0;
Expand All @@ -8,7 +8,7 @@ LL | let a = u.y; //~ ERROR use of moved value: `u.y`
|
= note: move occurs because `u` has type `U`, which does not implement the `Copy` trait

error[E0382]: use of moved value: `u.y`
error[E0382]: use of moved value: `u`
--> $DIR/union-borrow-move-parent-sibling.rs:41:13
|
LL | let a = (u.x.0).0;
Expand All @@ -18,7 +18,7 @@ LL | let a = u.y; //~ ERROR use of moved value: `u.y`
|
= note: move occurs because `u` has type `U`, which does not implement the `Copy` trait

error[E0382]: use of moved value: `u.x`
error[E0382]: use of moved value: `u`
--> $DIR/union-borrow-move-parent-sibling.rs:53:13
|
LL | let a = *u.y;
Expand Down
13 changes: 13 additions & 0 deletions src/test/ui/use/use-after-move-self-based-on-type.nll.stderr
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
error[E0382]: use of moved value: `self`
--> $DIR/use-after-move-self-based-on-type.rs:22:16
|
LL | self.bar();
| ---- value moved here
LL | return self.x; //~ ERROR use of moved value: `self.x`
| ^^^^^^ value used here after move
|
= note: move occurs because `self` has type `S`, which does not implement the `Copy` trait

error: aborting due to previous error

For more information about this error, try `rustc --explain E0382`.
2 changes: 1 addition & 1 deletion src/test/ui/use/use-after-move-self.nll.stderr
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
error[E0382]: use of moved value: `*self.x`
error[E0382]: use of moved value: `self`
--> $DIR/use-after-move-self.rs:20:16
|
LL | self.bar();
Expand Down
2 changes: 1 addition & 1 deletion src/test/ui/walk-struct-literal-with.nll.stderr
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
error[E0382]: borrow of moved value: `start.test`
error[E0382]: borrow of moved value: `start`
--> $DIR/walk-struct-literal-with.rs:26:20
|
LL | let end = Mine{other_val:1, ..start.make_string_bar()};
Expand Down

0 comments on commit 5b74843

Please sign in to comment.