-
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
Use LitKind::Err
for malformed floats
#121724
Conversation
Best reviewed one commit at at time. |
This comment has been minimized.
This comment has been minimized.
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.
r=me with failing test blessed
This prevents a follow-up type error in a test, which seems fine.
- Put every literal in its own braces, rather than just some of them, for maximal error recovery. - Add a blank line between every case, for readability.
This slightly changes error messages in `float-field.rs`, but nothing of real importance.
7772605
to
840c8d3
Compare
Some changes occurred in src/tools/clippy cc @rust-lang/clippy |
I fixed the clippy test. I think the change kind of neuters it, because the path to the crash that was happening is no longer possible. But I don't think that matters much. @bors r=fmease |
Bors? @bors r+ |
@bors r+ |
…, r=fmease Use `LitKind::Err` for malformed floats rust-lang#121120 changed `StringReader::cook_lexer_literal` to return `LitKind::Err` for malformed integer literals. This commit does the same for float literals, for consistency. r? `@fmease`
…iaskrgr Rollup of 5 pull requests Successful merges: - rust-lang#110543 (Make `ReentrantLock` public) - rust-lang#121689 ([rustdoc] Prevent inclusion of whitespace character after macro_rules ident) - rust-lang#121724 (Use `LitKind::Err` for malformed floats) - rust-lang#121735 (pattern analysis: Don't panic when encountering unexpected constructor) - rust-lang#121743 (Opportunistically resolve regions when processing region outlives obligations) Failed merges: - rust-lang#121326 (Detect empty leading where clauses on type aliases) - rust-lang#121416 (Improve error messages for generics with default parameters) - rust-lang#121669 (Count stashed errors again) - rust-lang#121723 (Two diagnostic things) r? `@ghost` `@rustbot` modify labels: rollup
Rollup merge of rust-lang#121724 - nnethercote:LitKind-Err-for-floats, r=fmease Use `LitKind::Err` for malformed floats rust-lang#121120 changed `StringReader::cook_lexer_literal` to return `LitKind::Err` for malformed integer literals. This commit does the same for float literals, for consistency. r? ``@fmease``
…, r=fmease Use `LitKind::Err` for malformed floats rust-lang#121120 changed `StringReader::cook_lexer_literal` to return `LitKind::Err` for malformed integer literals. This commit does the same for float literals, for consistency. r? ``@fmease``
#121120 changed
StringReader::cook_lexer_literal
to returnLitKind::Err
for malformed integer literals. This commit does the same for float literals, for consistency.r? @fmease