-
Notifications
You must be signed in to change notification settings - Fork 12.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Do not ICE on unicode next point #68084
Merged
Merged
Changes from all commits
Commits
Show all changes
5 commits
Select commit
Hold shift + click to select a range
fcd850f
Do not ICE on unicode next point
estebank 3250057
Fix `next_point` to be unicode aware
estebank d558f6a
Fix invalid bounding box
estebank b93ef68
Change `next_point` when `shrink_to_hi` is more appropriate
estebank f6e9fd0
Add ICE regression tests
estebank File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
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
6 changes: 6 additions & 0 deletions
6
src/test/ui/issues/issue-68000-unicode-ident-after-missing-comma.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,6 @@ | ||
pub struct Foo { | ||
pub bar: Vec<i32>ö | ||
//~^ ERROR expected `,`, or `}`, found `ö` | ||
} //~ ERROR expected `:`, found `}` | ||
|
||
fn main() {} |
17 changes: 17 additions & 0 deletions
17
src/test/ui/issues/issue-68000-unicode-ident-after-missing-comma.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,17 @@ | ||
error: expected `,`, or `}`, found `ö` | ||
--> $DIR/issue-68000-unicode-ident-after-missing-comma.rs:2:22 | ||
| | ||
LL | pub bar: Vec<i32>ö | ||
| ^ help: try adding a comma: `,` | ||
|
||
error: expected `:`, found `}` | ||
--> $DIR/issue-68000-unicode-ident-after-missing-comma.rs:4:1 | ||
| | ||
LL | pub bar: Vec<i32>ö | ||
| - expected `:` | ||
LL | | ||
LL | } | ||
| ^ unexpected token | ||
|
||
error: aborting due to 2 previous errors | ||
|
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,9 @@ | ||
macro_rules! x { | ||
($($c:tt)*) => { | ||
$($c)ö* {} //~ ERROR missing condition for `if` expression | ||
}; //~| ERROR mismatched types | ||
} | ||
|
||
fn main() { | ||
x!(if); | ||
} |
18 changes: 18 additions & 0 deletions
18
src/test/ui/issues/issue-68091-unicode-ident-after-if.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,18 @@ | ||
error: missing condition for `if` expression | ||
--> $DIR/issue-68091-unicode-ident-after-if.rs:3:14 | ||
| | ||
LL | $($c)ö* {} | ||
| ^ expected if condition here | ||
|
||
error[E0308]: mismatched types | ||
--> $DIR/issue-68091-unicode-ident-after-if.rs:3:17 | ||
| | ||
LL | $($c)ö* {} | ||
| ^^ expected `bool`, found `()` | ||
... | ||
LL | x!(if); | ||
| ------- in this macro invocation | ||
|
||
error: aborting due to 2 previous errors | ||
|
||
For more information about this error, try `rustc --explain E0308`. |
9 changes: 9 additions & 0 deletions
9
src/test/ui/issues/issue-68092-unicode-ident-after-incomplete-expr.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,9 @@ | ||
macro_rules! x { | ||
($($c:tt)*) => { | ||
$($c)ö* //~ ERROR macro expansion ends with an incomplete expression: expected expression | ||
}; | ||
} | ||
|
||
fn main() { | ||
x!(!); | ||
} |
8 changes: 8 additions & 0 deletions
8
src/test/ui/issues/issue-68092-unicode-ident-after-incomplete-expr.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,8 @@ | ||
error: macro expansion ends with an incomplete expression: expected expression | ||
--> $DIR/issue-68092-unicode-ident-after-incomplete-expr.rs:3:14 | ||
| | ||
LL | $($c)ö* | ||
| ^ expected expression | ||
|
||
error: aborting due to previous error | ||
|
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is the only necessary change to stop the ICEs in stable and beta.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This isolated change is stable-accepted