-
Notifications
You must be signed in to change notification settings - Fork 13.2k
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
Fix float ICE #90927
Fix float ICE #90927
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
fn main() { | ||
a.5.2E+ | ||
//~^ ERROR: unexpected token: `5.2E+` | ||
//~| ERROR: expected one of `.`, `;`, `?`, `}`, or an operator, found `5.2E+` | ||
//~| ERROR: expected at least one digit in exponent | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
error: expected at least one digit in exponent | ||
--> $DIR/issue-90728.rs:2:7 | ||
| | ||
LL | a.5.2E+ | ||
| ^^^^^ | ||
|
||
error: unexpected token: `5.2E+` | ||
--> $DIR/issue-90728.rs:2:7 | ||
| | ||
LL | a.5.2E+ | ||
| ^^^^^ | ||
|
||
error: expected one of `.`, `;`, `?`, `}`, or an operator, found `5.2E+` | ||
--> $DIR/issue-90728.rs:2:7 | ||
| | ||
LL | a.5.2E+ | ||
| ^^^^^ expected one of `.`, `;`, `?`, `}`, or an operator | ||
Comment on lines
+7
to
+17
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. And we could recover more gracefully after encountering it ^_^ There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Do you mean like spitting out no errors afterwards? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Correct, but that doesn't have to be addressed in this PR. |
||
|
||
error: aborting due to 3 previous errors | ||
|
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 error in particular could likely be more actionable.
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.
Could you be a bit more precise about that?
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.
I mean using a
span_suggestion_verbose
(andSourceMap::next_point(Span)
) to produce something like the following (just a rough draft, doesn't have to look like this exactly):