forked from rust-lang/rust
-
-
Notifications
You must be signed in to change notification settings - Fork 0
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 rust-lang#80185 - JohnTitor:issue-80134, r=davidtwco
Fix ICE when pointing at multi bytes character Fixes rust-lang#80134 Seems this ICE was introduced by rust-lang#73953, checking width of span to avoid ICE.
- 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