More expressions correctly are marked to end with curly braces by GearsDatapacks · Pull Request #118880 · rust-lang/rust
rustbot
added
S-waiting-on-review
labels
Dec 12, 2023…sion kinds to specify whether they contain a brace Add inline const and other possible curly brace expressions to expr_trailing_brace Add tests for `}` before `else` in `let...else` error Change to explicit cases for expressions with optional values when being checked for trailing braces Add tests for more complex cases of `}` before `else` in `let..else` statement Move other possible `}` cases into separate arm and add FIXME for future reference
bors
added
S-waiting-on-bors
and removed S-waiting-on-review
Status: Awaiting review from the assignee but also interested parties. Status: This is awaiting some action (such as code changes or more information) from the author.labels
Dec 17, 2023bors added a commit to rust-lang-ci/rust that referenced this pull request
Dec 17, 2023…iaskrgr Rollup of 4 pull requests Successful merges: - rust-lang#118880 (More expressions correctly are marked to end with curly braces) - rust-lang#118928 (fix: Overlapping spans in delimited meta-vars) - rust-lang#119022 (Remove unnecessary constness from ProjectionCandidate) - rust-lang#119052 (Avoid overflow in GVN constant indexing.) r? `@ghost` `@rustbot` modify labels: rollup
rust-timer added a commit to rust-lang-ci/rust that referenced this pull request
Dec 17, 2023Rollup merge of rust-lang#118880 - GearsDatapacks:issue-118859-fix, r=compiler-errors More expressions correctly are marked to end with curly braces Fixes rust-lang#118859, and replaces the mentioned match statement with an exhaustive list, so that this code doesn't get overlooked in the future
fmease added a commit to fmease/rust that referenced this pull request
May 22, 2024Disallow cast with trailing braced macro in let-else This fixes an edge case I noticed while porting rust-lang#118880 and rust-lang#119062 to syn. Previously, rustc incorrectly accepted code such as: ```rust let foo = &std::ptr::null as &'static dyn std::ops::Fn() -> *const primitive! { 8 } else { return; }; ``` even though a right curl brace `}` directly before `else` in a `let...else` statement is not supposed to be valid syntax.
rust-timer added a commit to rust-lang-ci/rust that referenced this pull request
May 22, 2024Rollup merge of rust-lang#125049 - dtolnay:castbrace, r=compiler-errors Disallow cast with trailing braced macro in let-else This fixes an edge case I noticed while porting rust-lang#118880 and rust-lang#119062 to syn. Previously, rustc incorrectly accepted code such as: ```rust let foo = &std::ptr::null as &'static dyn std::ops::Fn() -> *const primitive! { 8 } else { return; }; ``` even though a right curl brace `}` directly before `else` in a `let...else` statement is not supposed to be valid syntax.
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