-
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.
Fix ICE when pointing at multi bytes character
- Loading branch information
Showing
6 changed files
with
66 additions
and
21 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
12 changes: 12 additions & 0 deletions
12
src/test/ui/parser/multibyte-char-use-seperator-issue-80134.rs
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 @@ | ||
// Regression test for #80134. | ||
|
||
fn main() { | ||
(()é); | ||
//~^ ERROR: expected one of `)`, `,`, `.`, `?`, or an operator | ||
//~| ERROR: cannot find value `é` in this scope | ||
//~| ERROR: non-ascii idents are not fully supported | ||
(()氷); | ||
//~^ ERROR: expected one of `)`, `,`, `.`, `?`, or an operator | ||
//~| ERROR: cannot find value `氷` in this scope | ||
//~| ERROR: non-ascii idents are not fully supported | ||
} |
52 changes: 52 additions & 0 deletions
52
src/test/ui/parser/multibyte-char-use-seperator-issue-80134.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,52 @@ | ||
error: expected one of `)`, `,`, `.`, `?`, or an operator, found `é` | ||
--> $DIR/multibyte-char-use-seperator-issue-80134.rs:4:8 | ||
| | ||
LL | (()é); | ||
| ^ | ||
| | | ||
| expected one of `)`, `,`, `.`, `?`, or an operator | ||
| help: missing `,` | ||
|
||
error: expected one of `)`, `,`, `.`, `?`, or an operator, found `氷` | ||
--> $DIR/multibyte-char-use-seperator-issue-80134.rs:8:8 | ||
| | ||
LL | (()氷); | ||
| -^ | ||
| | | ||
| expected one of `)`, `,`, `.`, `?`, or an operator | ||
| help: missing `,` | ||
|
||
error[E0425]: cannot find value `é` in this scope | ||
--> $DIR/multibyte-char-use-seperator-issue-80134.rs:4:8 | ||
| | ||
LL | (()é); | ||
| ^ not found in this scope | ||
|
||
error[E0425]: cannot find value `氷` in this scope | ||
--> $DIR/multibyte-char-use-seperator-issue-80134.rs:8:8 | ||
| | ||
LL | (()氷); | ||
| ^^ not found in this scope | ||
|
||
error[E0658]: non-ascii idents are not fully supported | ||
--> $DIR/multibyte-char-use-seperator-issue-80134.rs:4:8 | ||
| | ||
LL | (()é); | ||
| ^ | ||
| | ||
= note: see issue #55467 <https://github.com/rust-lang/rust/issues/55467> for more information | ||
= help: add `#![feature(non_ascii_idents)]` to the crate attributes to enable | ||
|
||
error[E0658]: non-ascii idents are not fully supported | ||
--> $DIR/multibyte-char-use-seperator-issue-80134.rs:8:8 | ||
| | ||
LL | (()氷); | ||
| ^^ | ||
| | ||
= note: see issue #55467 <https://github.com/rust-lang/rust/issues/55467> for more information | ||
= help: add `#![feature(non_ascii_idents)]` to the crate attributes to enable | ||
|
||
error: aborting due to 6 previous errors | ||
|
||
Some errors have detailed explanations: E0425, E0658. | ||
For more information about an error, try `rustc --explain E0425`. |
This file was deleted.
Oops, something went wrong.
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,5 +1,3 @@ | ||
// run-rustfix | ||
|
||
#![allow(unused_imports)] | ||
|
||
pub mod x { | ||
|
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