-
Notifications
You must be signed in to change notification settings - Fork 13.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
parse: backtrack to avoid stealing e.g.
x.f()
at mod level.
- Loading branch information
Showing
20 changed files
with
191 additions
and
85 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
can-only-test-this-in-run-make-fulldeps //~ ERROR expected one of `!` or `::`, found `-` | ||
can-only-test-this-in-run-make-fulldeps //~ ERROR expected item, found `can` |
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 |
---|---|---|
@@ -1,8 +1,8 @@ | ||
error: expected one of `!` or `::`, found `-` | ||
--> $DIR/feature-gate-extern_prelude.rs:1:4 | ||
error: expected item, found `can` | ||
--> $DIR/feature-gate-extern_prelude.rs:1:1 | ||
| | ||
LL | can-only-test-this-in-run-make-fulldeps | ||
| ^ expected one of `!` or `::` | ||
| ^^^ expected item | ||
|
||
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
// error-pattern: expected one of `!` or `::`, found `<eof>` | ||
// error-pattern: expected item, found `parse_error` | ||
include!("auxiliary/issue-21146-inc.rs"); | ||
fn main() {} |
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 |
---|---|---|
@@ -1,8 +1,8 @@ | ||
error: expected one of `!` or `::`, found `<eof>` | ||
error: expected item, found `parse_error` | ||
--> $DIR/auxiliary/issue-21146-inc.rs:3:1 | ||
| | ||
LL | parse_error | ||
| ^^^^^^^^^^^ expected one of `!` or `::` | ||
| ^^^^^^^^^^^ | ||
|
||
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,36 @@ | ||
error: expected one of `!` or `::`, found `cat` | ||
--> $DIR/class-implements-bad-trait.rs:2:7 | ||
error: expected one of `.`, `;`, `?`, `}`, or an operator, found `{` | ||
--> $DIR/class-implements-bad-trait.rs:4:21 | ||
| | ||
LL | class cat : nonexistent { | ||
| ^^^ expected one of `!` or `::` | ||
LL | new(in_x : usize) { self.meows = in_x; } | ||
| ^ expected one of `.`, `;`, `?`, `}`, or an operator | ||
|
||
error: aborting due to previous error | ||
error: statements cannot reside in modules | ||
--> $DIR/class-implements-bad-trait.rs:2:1 | ||
| | ||
LL | class cat : nonexistent { | ||
| _^^^^^___________________^ | ||
LL | | let meows: usize; | ||
LL | | new(in_x : usize) { self.meows = in_x; } | ||
LL | | } | ||
| |_^ | ||
| | ||
= note: the program entry point starts in `fn main() { ... }`, defined in `main.rs` | ||
= note: for more on functions and how to structure your program, see https://doc.rust-lang.org/book/ch03-03-how-functions-work.html | ||
help: consider moving the statements into a function | ||
| | ||
LL | fn my_function() -> _ { | ||
LL | class; | ||
LL | cat: nonexistent; | ||
LL | { let meows: usize; (/*ERROR*/) } | ||
LL | } | ||
| | ||
|
||
error[E0425]: cannot find function `cat` in this scope | ||
--> $DIR/class-implements-bad-trait.rs:8:14 | ||
| | ||
LL | let nyan = cat(0); | ||
| ^^^ not found in this scope | ||
|
||
error: aborting due to 3 previous errors | ||
|
||
For more information about this error, try `rustc --explain E0425`. |
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 |
---|---|---|
@@ -1,12 +1,12 @@ | ||
error: expected one of `!` or `::`, found `(` | ||
--> $DIR/extern-no-fn.rs:2:6 | ||
error: non-item in item list | ||
--> $DIR/extern-no-fn.rs:2:5 | ||
| | ||
LL | extern { | ||
| - while parsing this item list starting here | ||
| - item list starts here | ||
LL | f(); | ||
| ^ expected one of `!` or `::` | ||
| ^ non-item starts here | ||
LL | } | ||
| - the item list ends here | ||
| - item list ends here | ||
|
||
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
trait MyTrait<T>: Iterator { | ||
Item = T; | ||
//~^ ERROR expected one of `!` or `::`, found `=` | ||
//~^ ERROR non-item in item list | ||
} | ||
|
||
fn main() {} |
Oops, something went wrong.