-
Notifications
You must be signed in to change notification settings - Fork 12.7k
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 #104433 - TaKO8Ki:fix-104392, r=estebank
Fix `emit_unused_delims_expr` ICE Fixes #104392
- Loading branch information
Showing
3 changed files
with
45 additions
and
9 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,11 @@ | ||
fn main() { | ||
{ unsafe 92 } //~ ERROR expected `{`, found `92` | ||
} | ||
|
||
fn foo() { | ||
{ mod 92 } //~ ERROR expected identifier, found `92` | ||
} | ||
|
||
fn bar() { | ||
{ trait 92 } //~ ERROR expected identifier, found `92` | ||
} |
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,27 @@ | ||
error: expected `{`, found `92` | ||
--> $DIR/issue-104392.rs:2:14 | ||
| | ||
LL | { unsafe 92 } | ||
| ------ ^^ expected `{` | ||
| | | ||
| while parsing this `unsafe` expression | ||
| | ||
help: try placing this code inside a block | ||
| | ||
LL | { unsafe { 92 } } | ||
| + + | ||
|
||
error: expected identifier, found `92` | ||
--> $DIR/issue-104392.rs:6:11 | ||
| | ||
LL | { mod 92 } | ||
| ^^ expected identifier | ||
|
||
error: expected identifier, found `92` | ||
--> $DIR/issue-104392.rs:10:13 | ||
| | ||
LL | { trait 92 } | ||
| ^^ expected identifier | ||
|
||
error: aborting due to 3 previous errors | ||
|