Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Update the previously checkpointed (but unused by bors) tests to refl…
…ect current reality.
- Loading branch information
Showing
19 changed files
with
174 additions
and
50 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
error[E0382]: use of moved value: `foo.x` | ||
--> $DIR/fields-move.rs:38:42 | ||
| | ||
LL | $foo.x | ||
| ------ value moved here | ||
... | ||
LL | assert_two_copies(copy_modern!(foo), foo.x); //~ ERROR use of moved value: `foo.x` | ||
| ^^^^^ value used here after move | ||
| | ||
= note: move occurs because `foo.x` has type `NonCopy`, which does not implement the `Copy` trait | ||
|
||
error[E0382]: use of moved value: `foo.x` | ||
--> $DIR/fields-move.rs:28:9 | ||
| | ||
LL | $foo.x | ||
| ------ value moved here | ||
... | ||
LL | $foo.x //~ ERROR use of moved value: `foo.x` | ||
| ^^^^^^ value used here after move | ||
... | ||
LL | assert_two_copies(copy_modern!(foo), foo.x); //~ ERROR use of moved value: `foo.x` | ||
| ----- value moved here | ||
LL | assert_two_copies(copy_legacy!(foo), foo.x); //~ ERROR use of moved value: `foo.x` | ||
| ----------------- in this macro invocation | ||
| | ||
= note: move occurs because `foo.x` has type `NonCopy`, which does not implement the `Copy` trait | ||
|
||
error[E0382]: use of moved value: `foo.x` | ||
--> $DIR/fields-move.rs:39:42 | ||
| | ||
LL | $foo.x | ||
| ------ value moved here | ||
... | ||
LL | $foo.x //~ ERROR use of moved value: `foo.x` | ||
| ------ value moved here | ||
... | ||
LL | assert_two_copies(copy_modern!(foo), foo.x); //~ ERROR use of moved value: `foo.x` | ||
| ----- value moved here | ||
LL | assert_two_copies(copy_legacy!(foo), foo.x); //~ ERROR use of moved value: `foo.x` | ||
| ^^^^^ value used here after move | ||
| | ||
= note: move occurs because `foo.x` has type `NonCopy`, which does not implement the `Copy` trait | ||
|
||
error: aborting due to 3 previous errors | ||
|
||
For more information about this error, try `rustc --explain E0382`. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
error: compilation successful | ||
--> $DIR/fields-numeric-borrowck.rs:13:1 | ||
| | ||
LL | / fn main() { #![rustc_error] // rust-lang/rust#49855 | ||
LL | | let mut s = S(0); | ||
LL | | let borrow1 = &mut s.0; | ||
LL | | let S { 0: ref mut borrow2 } = s; | ||
LL | | //~^ ERROR cannot borrow `s.0` as mutable more than once at a time | ||
LL | | } | ||
| |_^ | ||
|
||
error: aborting due to previous error | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
18 changes: 12 additions & 6 deletions
18
src/test/ui/rfc-2005-default-binding-mode/explicit-mut.nll.stderr
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
error[E0597]: `*a` does not live long enough | ||
--> $DIR/destructor-restrictions.rs:18:10 | ||
| | ||
LL | *a.borrow() + 1 | ||
| ^--------- | ||
| | | ||
| borrowed value does not live long enough | ||
| borrow may end up in a temporary, created here | ||
LL | }; //~^ ERROR `*a` does not live long enough | ||
| -- temporary later dropped here, potentially using the reference | ||
| | | ||
| borrowed value only lives until here | ||
|
||
error: aborting due to previous error | ||
|
||
For more information about this error, try `rustc --explain E0597`. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
error[E0597]: `y` does not live long enough | ||
--> $DIR/issue-23338-locals-die-before-temps-of-body.rs:20:5 | ||
| | ||
LL | y.borrow().clone() | ||
| ^--------- | ||
| | | ||
| borrowed value does not live long enough | ||
| borrow may end up in a temporary, created here | ||
LL | } | ||
| - | ||
| | | ||
| borrowed value only lives until here | ||
| temporary later dropped here, potentially using the reference | ||
|
||
error[E0597]: `y` does not live long enough | ||
--> $DIR/issue-23338-locals-die-before-temps-of-body.rs:27:9 | ||
| | ||
LL | y.borrow().clone() | ||
| ^--------- | ||
| | | ||
| borrowed value does not live long enough | ||
| borrow may end up in a temporary, created here | ||
LL | }; | ||
| -- temporary later dropped here, potentially using the reference | ||
| | | ||
| borrowed value only lives until here | ||
|
||
error: aborting due to 2 previous errors | ||
|
||
For more information about this error, try `rustc --explain E0597`. |
Oops, something went wrong.