-
Notifications
You must be signed in to change notification settings - Fork 13k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Rollup merge of #91634 - terrarier2111:fix-recover-from-variant-ice, …
…r=nagisa Do not attempt to suggest help for overly malformed struct/function call This fixes: #91461
- Loading branch information
Showing
3 changed files
with
64 additions
and
20 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
fn main() { | ||
a(_:b:,) | ||
//~^ ERROR: expected identifier, found reserved identifier `_` | ||
//~| ERROR: expected type, found `,` | ||
//~| ERROR: expected type, found `,` | ||
} |
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: expected identifier, found reserved identifier `_` | ||
--> $DIR/issue-91461.rs:2:7 | ||
| | ||
LL | a(_:b:,) | ||
| ^ expected identifier, found reserved identifier | ||
|
||
error: expected type, found `,` | ||
--> $DIR/issue-91461.rs:2:11 | ||
| | ||
LL | a(_:b:,) | ||
| - -^ expected type | ||
| | | | ||
| | tried to parse a type due to this type ascription | ||
| while parsing this struct | ||
| | ||
= note: `#![feature(type_ascription)]` lets you annotate an expression with a type: `<expr>: <type>` | ||
= note: see issue #23416 <https://github.com/rust-lang/rust/issues/23416> for more information | ||
|
||
error: expected type, found `,` | ||
--> $DIR/issue-91461.rs:2:11 | ||
| | ||
LL | a(_:b:,) | ||
| -^ expected type | ||
| | | ||
| tried to parse a type due to this type ascription | ||
| | ||
= note: `#![feature(type_ascription)]` lets you annotate an expression with a type: `<expr>: <type>` | ||
= note: see issue #23416 <https://github.com/rust-lang/rust/issues/23416> for more information | ||
|
||
error: aborting due to 3 previous errors | ||
|