-
Notifications
You must be signed in to change notification settings - Fork 12.8k
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 #55236 - petrochenkov:pfail, r=davidtwco
Move parse-fail tests to UI cc #53353 r? @davidtwco
- Loading branch information
Showing
587 changed files
with
3,245 additions
and
133 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
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,20 @@ | ||
error: this form of character escape may only be used with characters in the range [/x00-/x7f] | ||
--> $DIR/ascii-only-character-escape.rs:14:16 | ||
| | ||
LL | let x = "/x80"; //~ ERROR may only be used | ||
| ^^ | ||
|
||
error: this form of character escape may only be used with characters in the range [/x00-/x7f] | ||
--> $DIR/ascii-only-character-escape.rs:15:16 | ||
| | ||
LL | let y = "/xff"; //~ ERROR may only be used | ||
| ^^ | ||
|
||
error: this form of character escape may only be used with characters in the range [/x00-/x7f] | ||
--> $DIR/ascii-only-character-escape.rs:16:16 | ||
| | ||
LL | let z = "/xe2"; //~ ERROR may only be used | ||
| ^^ | ||
|
||
error: aborting due to 3 previous errors | ||
|
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,8 @@ | ||
error: expected one of `.`, `;`, `?`, or `}`, found `[` | ||
--> $DIR/assoc-oddities-1.rs:20:28 | ||
| | ||
LL | ..if c { a } else { b }[n]; //~ ERROR expected one of | ||
| ^ expected one of `.`, `;`, `?`, or `}` here | ||
|
||
error: aborting due to previous error | ||
|
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,8 @@ | ||
error: expected one of `.`, `;`, `?`, or `}`, found `[` | ||
--> $DIR/assoc-oddities-2.rs:15:29 | ||
| | ||
LL | x..if c { a } else { b }[n]; //~ ERROR expected one of | ||
| ^ expected one of `.`, `;`, `?`, or `}` here | ||
|
||
error: aborting due to previous error | ||
|
File renamed without changes.
14 changes: 14 additions & 0 deletions
14
src/test/ui/parser/associated-types-project-from-hrtb-explicit.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: expected identifier, found keyword `for` | ||
--> $DIR/associated-types-project-from-hrtb-explicit.rs:22:21 | ||
| | ||
LL | fn foo2<I>(x: <I as for<'x> Foo<&'x isize>>::A) | ||
| ^^^ expected identifier, found keyword | ||
|
||
error: expected one of `::` or `>`, found `Foo` | ||
--> $DIR/associated-types-project-from-hrtb-explicit.rs:22:29 | ||
| | ||
LL | fn foo2<I>(x: <I as for<'x> Foo<&'x isize>>::A) | ||
| ^^^ expected one of `::` or `>` here | ||
|
||
error: aborting due to 2 previous errors | ||
|
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,8 @@ | ||
error: unexpected token: `]` | ||
--> $DIR/attr-bad-meta-2.rs:13:9 | ||
| | ||
LL | #[path =] //~ ERROR unexpected token: `]` | ||
| ^ unexpected token after this | ||
|
||
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
error: expected `]`, found `token` | ||
--> $DIR/attr-bad-meta-3.rs:13:10 | ||
| | ||
LL | #[path() token] //~ ERROR expected `]`, found `token` | ||
| ^^^^^ expected `]` | ||
|
||
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
error: expected one of `(`, `::`, `=`, `[`, `]`, or `{`, found `*` | ||
--> $DIR/attr-bad-meta.rs:15:7 | ||
| | ||
LL | #[path*] //~ ERROR expected one of `(`, `::`, `=`, `[`, `]`, or `{`, found `*` | ||
| ^ expected one of `(`, `::`, `=`, `[`, `]`, or `{` here | ||
|
||
error: aborting due to previous error | ||
|
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,8 @@ | ||
error: expected item after attributes | ||
--> $DIR/attr-before-eof.rs:13:16 | ||
| | ||
LL | #[derive(Debug)] //~ERROR expected item after attributes | ||
| ^ | ||
|
||
error: aborting due to previous error | ||
|
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,8 @@ | ||
error: expected statement after outer attribute | ||
--> $DIR/attr-dangling-in-fn.rs:17:1 | ||
| | ||
LL | } | ||
| ^ | ||
|
||
error: aborting due to previous error | ||
|
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,8 @@ | ||
error: expected item after attributes | ||
--> $DIR/attr-dangling-in-mod.rs:18:14 | ||
| | ||
LL | #[foo = "bar"] | ||
| ^ | ||
|
||
error: aborting due to previous error | ||
|
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,10 @@ | ||
error: an inner attribute is not permitted in this context | ||
--> $DIR/attr.rs:17:3 | ||
| | ||
LL | #![lang(foo)] //~ ERROR an inner attribute is not permitted in this context | ||
| ^ | ||
| | ||
= note: inner attributes, like `#![no_std]`, annotate the item enclosing them, and are usually found at the beginning of source files. Outer attributes, like `#[test]`, annotate the item following them. | ||
|
||
error: aborting due to previous error | ||
|
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,8 @@ | ||
error: expected item after attributes | ||
--> $DIR/attrs-after-extern-mod.rs:22:19 | ||
| | ||
LL | #[cfg(stage37)] //~ ERROR expected item after attributes | ||
| ^ | ||
|
||
error: aborting due to previous error | ||
|
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.
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,114 @@ | ||
error: ABI spec with a suffix is invalid | ||
--> $DIR/bad-lit-suffixes.rs:15:5 | ||
| | ||
LL | "C"suffix //~ ERROR ABI spec with a suffix is invalid | ||
| ^^^^^^^^^ | ||
|
||
error: ABI spec with a suffix is invalid | ||
--> $DIR/bad-lit-suffixes.rs:19:5 | ||
| | ||
LL | "C"suffix //~ ERROR ABI spec with a suffix is invalid | ||
| ^^^^^^^^^ | ||
|
||
error: string literal with a suffix is invalid | ||
--> $DIR/bad-lit-suffixes.rs:23:5 | ||
| | ||
LL | ""suffix; //~ ERROR string literal with a suffix is invalid | ||
| ^^^^^^^^ | ||
|
||
error: byte string literal with a suffix is invalid | ||
--> $DIR/bad-lit-suffixes.rs:24:5 | ||
| | ||
LL | b""suffix; //~ ERROR byte string literal with a suffix is invalid | ||
| ^^^^^^^^^ | ||
|
||
error: string literal with a suffix is invalid | ||
--> $DIR/bad-lit-suffixes.rs:25:5 | ||
| | ||
LL | r#""#suffix; //~ ERROR string literal with a suffix is invalid | ||
| ^^^^^^^^^^^ | ||
|
||
error: byte string literal with a suffix is invalid | ||
--> $DIR/bad-lit-suffixes.rs:26:5 | ||
| | ||
LL | br#""#suffix; //~ ERROR byte string literal with a suffix is invalid | ||
| ^^^^^^^^^^^^ | ||
|
||
error: char literal with a suffix is invalid | ||
--> $DIR/bad-lit-suffixes.rs:27:5 | ||
| | ||
LL | 'a'suffix; //~ ERROR char literal with a suffix is invalid | ||
| ^^^^^^^^^ | ||
|
||
error: byte literal with a suffix is invalid | ||
--> $DIR/bad-lit-suffixes.rs:28:5 | ||
| | ||
LL | b'a'suffix; //~ ERROR byte literal with a suffix is invalid | ||
| ^^^^^^^^^^ | ||
|
||
error: invalid width `1024` for integer literal | ||
--> $DIR/bad-lit-suffixes.rs:30:5 | ||
| | ||
LL | 1234u1024; //~ ERROR invalid width `1024` for integer literal | ||
| ^^^^^^^^^ | ||
| | ||
= help: valid widths are 8, 16, 32, 64 and 128 | ||
|
||
error: invalid width `1024` for integer literal | ||
--> $DIR/bad-lit-suffixes.rs:31:5 | ||
| | ||
LL | 1234i1024; //~ ERROR invalid width `1024` for integer literal | ||
| ^^^^^^^^^ | ||
| | ||
= help: valid widths are 8, 16, 32, 64 and 128 | ||
|
||
error: invalid width `1024` for float literal | ||
--> $DIR/bad-lit-suffixes.rs:32:5 | ||
| | ||
LL | 1234f1024; //~ ERROR invalid width `1024` for float literal | ||
| ^^^^^^^^^ | ||
| | ||
= help: valid widths are 32 and 64 | ||
|
||
error: invalid width `1024` for float literal | ||
--> $DIR/bad-lit-suffixes.rs:33:5 | ||
| | ||
LL | 1234.5f1024; //~ ERROR invalid width `1024` for float literal | ||
| ^^^^^^^^^^^ | ||
| | ||
= help: valid widths are 32 and 64 | ||
|
||
error: invalid suffix `suffix` for numeric literal | ||
--> $DIR/bad-lit-suffixes.rs:35:5 | ||
| | ||
LL | 1234suffix; //~ ERROR invalid suffix `suffix` for numeric literal | ||
| ^^^^^^^^^^ | ||
| | ||
= help: the suffix must be one of the integral types (`u32`, `isize`, etc) | ||
|
||
error: invalid suffix `suffix` for numeric literal | ||
--> $DIR/bad-lit-suffixes.rs:36:5 | ||
| | ||
LL | 0b101suffix; //~ ERROR invalid suffix `suffix` for numeric literal | ||
| ^^^^^^^^^^^ | ||
| | ||
= help: the suffix must be one of the integral types (`u32`, `isize`, etc) | ||
|
||
error: invalid suffix `suffix` for float literal | ||
--> $DIR/bad-lit-suffixes.rs:37:5 | ||
| | ||
LL | 1.0suffix; //~ ERROR invalid suffix `suffix` for float literal | ||
| ^^^^^^^^^ | ||
| | ||
= help: valid suffixes are `f32` and `f64` | ||
|
||
error: invalid suffix `suffix` for float literal | ||
--> $DIR/bad-lit-suffixes.rs:38:5 | ||
| | ||
LL | 1.0e10suffix; //~ ERROR invalid suffix `suffix` for float literal | ||
| ^^^^^^^^^^^^ | ||
| | ||
= help: valid suffixes are `f32` and `f64` | ||
|
||
error: aborting due to 16 previous errors | ||
|
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,8 @@ | ||
error: expected one of `:`, `;`, `=`, or `@`, found `x` | ||
--> $DIR/bad-match.rs:16:13 | ||
| | ||
LL | let isize x = 5; | ||
| ^ expected one of `:`, `;`, `=`, or `@` here | ||
|
||
error: aborting due to previous error | ||
|
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,8 @@ | ||
error: expected one of `:`, `;`, `=`, or `@`, found `.` | ||
--> $DIR/bad-name.rs:16:8 | ||
| | ||
LL | let x.y::<isize>.z foo; | ||
| ^ expected one of `:`, `;`, `=`, or `@` here | ||
|
||
error: aborting due to previous error | ||
|
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,8 @@ | ||
error: expected mut or const in raw pointer type (use `*mut T` or `*const T` as appropriate) | ||
--> $DIR/bad-pointer-type.rs:13:11 | ||
| | ||
LL | fn foo(_: *()) { | ||
| ^ | ||
|
||
error: aborting due to previous error | ||
|
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,8 @@ | ||
error: expected identifier, found keyword `false` | ||
--> $DIR/bad-value-ident-false.rs:13:4 | ||
| | ||
LL | fn false() { } //~ ERROR expected identifier, found keyword `false` | ||
| ^^^^^ expected identifier, found keyword | ||
|
||
error: aborting due to previous error | ||
|
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,8 @@ | ||
error: expected identifier, found keyword `true` | ||
--> $DIR/bad-value-ident-true.rs:13:4 | ||
| | ||
LL | fn true() { } //~ ERROR expected identifier, found keyword `true` | ||
| ^^^^ expected identifier, found keyword | ||
|
||
error: aborting due to previous error | ||
|
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,10 @@ | ||
error: expected one of `!`, `(`, `+`, `::`, `;`, `<`, or `]`, found `3` | ||
--> $DIR/better-expected.rs:14:19 | ||
| | ||
LL | let x: [isize 3]; //~ ERROR expected one of `!`, `(`, `+`, `::`, `;`, `<`, or `]`, found `3` | ||
| - ^ expected one of 7 possible tokens here | ||
| | | ||
| while parsing the type for `x` | ||
|
||
error: aborting due to previous error | ||
|
File renamed without changes.
Oops, something went wrong.