Merged
Conversation
Contributor
|
r? @jackh726 (rust-highfive has picked a reviewer for you, use r? to override) |
This comment has been minimized.
This comment has been minimized.
camelid
reviewed
Jan 13, 2022
| | | ||
| help: try placing this code inside a block | ||
| | | ||
| LL | { std::mem::transmute::<f32, u32>(1.0); } |
Member
There was a problem hiding this comment.
Does this work with multiple statements too?
Contributor
Author
There was a problem hiding this comment.
It should be working with multiple statements, yes, but because of the way it does so I'm sure we can come up with cases where the recovery doesn't work as good as we'd want when multiple places where the block could be closed.
Member
|
@bors r+ sorry for the delay here |
Collaborator
|
📌 Commit 49479b4 has been approved by |
matthiaskrgr
added a commit
to matthiaskrgr/rust
that referenced
this pull request
Feb 25, 2022
Tweak diagnostics * Recover from invalid `'label: ` before block. * Make suggestion to enclose statements in a block multipart. * Point at `match`, `while`, `loop` and `unsafe` keywords when failing to parse their expression. (Fix rust-lang#92705.) * Do not suggest `{ ; }`. * Do not suggest `|` when very unlikely to be what was wanted (in `let` statements).
Member
|
@bors r- failed in a rollup |
Comment on lines
3
to
9
| #![feature(array_windows)] | ||
| #![feature(crate_visibility_modifier)] | ||
| #![feature(if_let_guard)] | ||
| #![feature(let_else)] | ||
| #![feature(box_patterns)] | ||
| #![recursion_limit = "256"] | ||
|
|
Member
There was a problem hiding this comment.
the let_else feature is already declared when bors rebases the PR before merge.
* Recover from invalid `'label: ` before block.
* Make suggestion to enclose statements in a block multipart.
* Point at `match`, `while`, `loop` and `unsafe` keywords when failing
to parse their expression.
* Do not suggest `{ ; }`.
* Do not suggest `|` when very unlikely to be what was wanted (in `let`
statements).
Contributor
Author
|
@bors r=jackh726 |
Collaborator
|
📌 Commit f42b4f5 has been approved by |
bors
added a commit
to rust-lang-ci/rust
that referenced
this pull request
Feb 28, 2022
…askrgr Rollup of 6 pull requests Successful merges: - rust-lang#92399 (fix typo in btree/vec doc: Self -> self) - rust-lang#92823 (Tweak diagnostics) - rust-lang#94248 (Fix ICE when passing block to while-loop condition) - rust-lang#94414 (Fix ICE when using Box<T, A> with large A) - rust-lang#94445 (4 - Make more use of `let_chains`) - rust-lang#94449 (Add long explanation for E0726) Failed merges: r? `@ghost` `@rustbot` modify labels: rollup
Dylan-DPC
added a commit
to Dylan-DPC/rust
that referenced
this pull request
Nov 7, 2022
…ould-not-have-label, r=lcnr Don't silently eat label before block in block-like expr Fixes rust-lang#103983 cc rust-lang#92823 (where the regression was introduced)
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
'label:before block.match,while,loopandunsafekeywords when failingto parse their expression. (Fix Using
while if lettriggers an error about mismatched curly brackets #92705.){ ; }.|when very unlikely to be what was wanted (inletstatements).