-
Notifications
You must be signed in to change notification settings - Fork 12.9k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Auto merge of #53196 - davidtwco:compile-fail-to-ui, r=nikomatsakis
Move `compile-fail` tests to `ui` Fixes #46841, #52531, #44844. r? @nikomatsakis
- Loading branch information
Showing
6,539 changed files
with
59,549 additions
and
77 deletions.
The diff you're trying to view is too large. We only load the first 3000 changed files.
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
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
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
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
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,31 @@ | ||
error[E0501]: cannot borrow `*a` as mutable because previous closure requires unique access | ||
--> $DIR/E0501.rs:28:23 | ||
| | ||
LL | let bar = || { | ||
| -- closure construction occurs here | ||
LL | inside_closure(a) | ||
| - first borrow occurs due to use of `a` in closure | ||
LL | }; | ||
LL | outside_closure_1(a); //[ast]~ ERROR cannot borrow `*a` as mutable because previous closure requires unique access | ||
| ^ borrow occurs here | ||
... | ||
LL | drop(bar); | ||
| --- borrow later used here | ||
|
||
error[E0501]: cannot borrow `*a` as immutable because previous closure requires unique access | ||
--> $DIR/E0501.rs:31:23 | ||
| | ||
LL | let bar = || { | ||
| -- closure construction occurs here | ||
LL | inside_closure(a) | ||
| - first borrow occurs due to use of `a` in closure | ||
... | ||
LL | outside_closure_2(a); //[ast]~ ERROR cannot borrow `*a` as immutable because previous closure requires unique access | ||
| ^ borrow occurs here | ||
... | ||
LL | drop(bar); | ||
| --- borrow later used here | ||
|
||
error: aborting due to 2 previous errors | ||
|
||
For more information about this error, try `rustc --explain E0501`. |
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,31 @@ | ||
error[E0501]: cannot borrow `*a` as mutable because previous closure requires unique access | ||
--> $DIR/E0501.rs:28:23 | ||
| | ||
LL | let bar = || { | ||
| -- closure construction occurs here | ||
LL | inside_closure(a) | ||
| - previous borrow occurs due to use of `a` in closure | ||
LL | }; | ||
LL | outside_closure_1(a); //[ast]~ ERROR cannot borrow `*a` as mutable because previous closure requires unique access | ||
| ^ borrow occurs here | ||
... | ||
LL | } | ||
| - borrow from closure ends here | ||
|
||
error[E0501]: cannot borrow `*a` as immutable because previous closure requires unique access | ||
--> $DIR/E0501.rs:31:23 | ||
| | ||
LL | let bar = || { | ||
| -- closure construction occurs here | ||
LL | inside_closure(a) | ||
| - previous borrow occurs due to use of `a` in closure | ||
... | ||
LL | outside_closure_2(a); //[ast]~ ERROR cannot borrow `*a` as immutable because previous closure requires unique access | ||
| ^ borrow occurs here | ||
... | ||
LL | } | ||
| - borrow from closure ends here | ||
|
||
error: aborting due to 2 previous errors | ||
|
||
For more information about this error, try `rustc --explain E0501`. |
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,31 @@ | ||
error[E0501]: cannot borrow `*a` as mutable because previous closure requires unique access | ||
--> $DIR/E0501.rs:28:23 | ||
| | ||
LL | let bar = || { | ||
| -- closure construction occurs here | ||
LL | inside_closure(a) | ||
| - first borrow occurs due to use of `a` in closure | ||
LL | }; | ||
LL | outside_closure_1(a); //[ast]~ ERROR cannot borrow `*a` as mutable because previous closure requires unique access | ||
| ^ borrow occurs here | ||
... | ||
LL | drop(bar); | ||
| --- borrow later used here | ||
|
||
error[E0501]: cannot borrow `*a` as immutable because previous closure requires unique access | ||
--> $DIR/E0501.rs:31:23 | ||
| | ||
LL | let bar = || { | ||
| -- closure construction occurs here | ||
LL | inside_closure(a) | ||
| - first borrow occurs due to use of `a` in closure | ||
... | ||
LL | outside_closure_2(a); //[ast]~ ERROR cannot borrow `*a` as immutable because previous closure requires unique access | ||
| ^ borrow occurs here | ||
... | ||
LL | drop(bar); | ||
| --- borrow later used here | ||
|
||
error: aborting due to 2 previous errors | ||
|
||
For more information about this error, try `rustc --explain E0501`. |
File renamed without changes.
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,14 @@ | ||
error[E0506]: cannot assign to `fancy_num` because it is borrowed | ||
--> $DIR/E0506.rs:21:5 | ||
| | ||
LL | let fancy_ref = &fancy_num; | ||
| ---------- borrow of `fancy_num` occurs here | ||
LL | fancy_num = FancyNum { num: 6 }; //[ast]~ ERROR E0506 | ||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ assignment to borrowed `fancy_num` occurs here | ||
... | ||
LL | println!("Num: {}, Ref: {}", fancy_num.num, fancy_ref.num); | ||
| ------------- borrow later used here | ||
|
||
error: aborting due to previous error | ||
|
||
For more information about this error, try `rustc --explain E0506`. |
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,11 @@ | ||
error[E0506]: cannot assign to `fancy_num` because it is borrowed | ||
--> $DIR/E0506.rs:21:5 | ||
| | ||
LL | let fancy_ref = &fancy_num; | ||
| --------- borrow of `fancy_num` occurs here | ||
LL | fancy_num = FancyNum { num: 6 }; //[ast]~ ERROR E0506 | ||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ assignment to borrowed `fancy_num` occurs here | ||
|
||
error: aborting due to previous error | ||
|
||
For more information about this error, try `rustc --explain E0506`. |
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,14 @@ | ||
error[E0506]: cannot assign to `fancy_num` because it is borrowed | ||
--> $DIR/E0506.rs:21:5 | ||
| | ||
LL | let fancy_ref = &fancy_num; | ||
| ---------- borrow of `fancy_num` occurs here | ||
LL | fancy_num = FancyNum { num: 6 }; //[ast]~ ERROR E0506 | ||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ assignment to borrowed `fancy_num` occurs here | ||
... | ||
LL | println!("Num: {}, Ref: {}", fancy_num.num, fancy_ref.num); | ||
| ------------- borrow later used here | ||
|
||
error: aborting due to previous error | ||
|
||
For more information about this error, try `rustc --explain E0506`. |
File renamed without changes.
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,12 @@ | ||
error[E0508]: cannot move out of type `[NonCopy; 1]`, a non-copy array | ||
--> $DIR/E0508-fail.rs:18:18 | ||
| | ||
LL | let _value = array[0]; //[ast]~ ERROR [E0508] | ||
| ^^^^^^^^ | ||
| | | ||
| cannot move out of here | ||
| help: consider using a reference instead: `&array[0]` | ||
|
||
error: aborting due to previous error | ||
|
||
For more information about this error, try `rustc --explain E0508`. |
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,12 @@ | ||
error[E0508]: cannot move out of type `[NonCopy; 1]`, a non-copy array | ||
--> $DIR/E0508-fail.rs:18:18 | ||
| | ||
LL | let _value = array[0]; //[ast]~ ERROR [E0508] | ||
| ^^^^^^^^ | ||
| | | ||
| cannot move out of here | ||
| help: consider using a reference instead: `&array[0]` | ||
|
||
error: aborting due to previous error | ||
|
||
For more information about this error, try `rustc --explain E0508`. |
File renamed without changes.
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,12 @@ | ||
error[E0508]: cannot move out of type `[NonCopy; 1]`, a non-copy array | ||
--> $DIR/E0508.rs:18:18 | ||
| | ||
LL | let _value = array[0]; //[ast]~ ERROR [E0508] | ||
| ^^^^^^^^ | ||
| | | ||
| cannot move out of here | ||
| help: consider using a reference instead: `&array[0]` | ||
|
||
error: aborting due to previous error | ||
|
||
For more information about this error, try `rustc --explain E0508`. |
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,12 @@ | ||
error[E0508]: cannot move out of type `[NonCopy; 1]`, a non-copy array | ||
--> $DIR/E0508.rs:18:18 | ||
| | ||
LL | let _value = array[0]; //[ast]~ ERROR [E0508] | ||
| ^^^^^^^^ | ||
| | | ||
| cannot move out of here | ||
| help: consider using a reference instead: `&array[0]` | ||
|
||
error: aborting due to previous error | ||
|
||
For more information about this error, try `rustc --explain E0508`. |
File renamed without changes.
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,11 @@ | ||
error[E0583]: file not found for module `module_that_doesnt_exist` | ||
--> $DIR/E0583.rs:11:5 | ||
| | ||
LL | mod module_that_doesnt_exist; //~ ERROR E0583 | ||
| ^^^^^^^^^^^^^^^^^^^^^^^^ | ||
| | ||
= help: name the file either module_that_doesnt_exist.rs or module_that_doesnt_exist/mod.rs inside the directory "$DIR" | ||
|
||
error: aborting due to previous error | ||
|
||
For more information about this error, try `rustc --explain E0583`. |
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,9 @@ | ||
error[E0594]: cannot assign to immutable static item `NUM` | ||
--> $DIR/E0594.rs:17:5 | ||
| | ||
LL | NUM = 20; //[ast]~ ERROR E0594 | ||
| ^^^^^^^^ cannot assign | ||
|
||
error: aborting due to previous error | ||
|
||
For more information about this error, try `rustc --explain E0594`. |
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,9 @@ | ||
error[E0594]: cannot assign to immutable static item | ||
--> $DIR/E0594.rs:17:5 | ||
| | ||
LL | NUM = 20; //[ast]~ ERROR E0594 | ||
| ^^^^^^^^ | ||
|
||
error: aborting due to previous error | ||
|
||
For more information about this error, try `rustc --explain E0594`. |
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,9 @@ | ||
error[E0594]: cannot assign to immutable static item `NUM` | ||
--> $DIR/E0594.rs:17:5 | ||
| | ||
LL | NUM = 20; //[ast]~ ERROR E0594 | ||
| ^^^^^^^^ cannot assign | ||
|
||
error: aborting due to previous error | ||
|
||
For more information about this error, try `rustc --explain E0594`. |
File renamed without changes.
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,11 @@ | ||
error[E0596]: cannot borrow `x` as mutable, as it is not declared as mutable | ||
--> $DIR/E0596.rs:16:13 | ||
| | ||
LL | let x = 1; | ||
| - help: consider changing this to be mutable: `mut x` | ||
LL | let y = &mut x; //[ast]~ ERROR [E0596] | ||
| ^^^^^^ cannot borrow as mutable | ||
|
||
error: aborting due to previous error | ||
|
||
For more information about this error, try `rustc --explain E0596`. |
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,11 @@ | ||
error[E0596]: cannot borrow immutable local variable `x` as mutable | ||
--> $DIR/E0596.rs:16:18 | ||
| | ||
LL | let x = 1; | ||
| - consider changing this to `mut x` | ||
LL | let y = &mut x; //[ast]~ ERROR [E0596] | ||
| ^ cannot borrow mutably | ||
|
||
error: aborting due to previous error | ||
|
||
For more information about this error, try `rustc --explain E0596`. |
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,11 @@ | ||
error[E0596]: cannot borrow `x` as mutable, as it is not declared as mutable | ||
--> $DIR/E0596.rs:16:13 | ||
| | ||
LL | let x = 1; | ||
| - help: consider changing this to be mutable: `mut x` | ||
LL | let y = &mut x; //[ast]~ ERROR [E0596] | ||
| ^^^^^^ cannot borrow as mutable | ||
|
||
error: aborting due to previous error | ||
|
||
For more information about this error, try `rustc --explain E0596`. |
File renamed without changes.
File renamed without changes.
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,21 @@ | ||
error[E0433]: failed to resolve. crate root in paths can only be used in start position | ||
--> $DIR/absolute-paths-in-nested-use-groups.rs:16:5 | ||
| | ||
LL | ::bar, //~ ERROR crate root in paths can only be used in start position | ||
| ^ crate root in paths can only be used in start position | ||
|
||
error[E0433]: failed to resolve. `super` in paths can only be used in start position | ||
--> $DIR/absolute-paths-in-nested-use-groups.rs:17:5 | ||
| | ||
LL | super::bar, //~ ERROR `super` in paths can only be used in start position | ||
| ^^^^^ `super` in paths can only be used in start position | ||
|
||
error[E0433]: failed to resolve. `self` in paths can only be used in start position | ||
--> $DIR/absolute-paths-in-nested-use-groups.rs:18:5 | ||
| | ||
LL | self::bar, //~ ERROR `self` in paths can only be used in start position | ||
| ^^^^ `self` in paths can only be used in start position | ||
|
||
error: aborting due to 3 previous errors | ||
|
||
For more information about this error, try `rustc --explain E0433`. |
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,12 @@ | ||
error[E0507]: cannot move out of borrowed content | ||
--> $DIR/access-mode-in-closures.rs:19:15 | ||
| | ||
LL | match *s { sty(v) => v } //~ ERROR cannot move out | ||
| ^^ - move occurs because v has type `std::vec::Vec<isize>`, which does not implement the `Copy` trait | ||
| | | ||
| cannot move out of borrowed content | ||
| help: consider removing this dereference operator: `s` | ||
|
||
error: aborting due to previous error | ||
|
||
For more information about this error, try `rustc --explain E0507`. |
File renamed without changes.
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,11 @@ | ||
error[E0507]: cannot move out of borrowed content | ||
--> $DIR/access-mode-in-closures.rs:19:15 | ||
| | ||
LL | match *s { sty(v) => v } //~ ERROR cannot move out | ||
| ^^ - hint: to prevent move, use `ref v` or `ref mut v` | ||
| | | ||
| cannot move out of borrowed content | ||
|
||
error: aborting due to previous error | ||
|
||
For more information about this error, try `rustc --explain E0507`. |
File renamed without changes.
14 changes: 14 additions & 0 deletions
14
src/test/ui/alloc-error/alloc-error-handler-bad-signature-1.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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
error: return type should be `!` | ||
--> $DIR/alloc-error-handler-bad-signature-1.rs:22:6 | ||
| | ||
LL | ) -> () //~ ERROR return type should be `!` | ||
| ^^ | ||
|
||
error: argument should be `Layout` | ||
--> $DIR/alloc-error-handler-bad-signature-1.rs:21:11 | ||
| | ||
LL | info: &Layout, //~ ERROR argument should be `Layout` | ||
| ^^^^^^^ | ||
|
||
error: aborting due to 2 previous errors | ||
|
File renamed without changes.
14 changes: 14 additions & 0 deletions
14
src/test/ui/alloc-error/alloc-error-handler-bad-signature-2.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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
error: return type should be `!` | ||
--> $DIR/alloc-error-handler-bad-signature-2.rs:22:3 | ||
| | ||
LL | ) { //~ ERROR return type should be `!` | ||
| ^ | ||
|
||
error: argument should be `Layout` | ||
--> $DIR/alloc-error-handler-bad-signature-2.rs:21:11 | ||
| | ||
LL | info: Layout, //~ ERROR argument should be `Layout` | ||
| ^^^^^^ | ||
|
||
error: aborting due to 2 previous errors | ||
|
File renamed without changes.
Oops, something went wrong.