This repository was archived by the owner on May 28, 2025. It is now read-only.
Commit da5b546
committed
Auto merge of rust-lang#99731 - ehuss:let-chain-bracket-check, r=compiler-errors
Remove let-chain close brace check.
rust-lang#98633 added some checks to forbid let-expressions that aren't in a let chain. This check looks at the preceding token to determine if it is a valid let-chain position. One of those tokens it checks is the close brace `}`. However, to my understanding, it is not possible for a let chain to be preceded by a close brace. This PR removes the check to avoid any confusion.
This is a followup to the discussion at rust-lang#98633 (review). It wasn't clear what issues the original PR ran into, but I have run the full set of CI tests and nothing failed. I also can't conceive of a situation where this would be possible. This doesn't reject any valid code, I'm just removing it to avoid confusion to anyone looking at this code in the future.1 file changed
+1
-4
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2356 | 2356 | | |
2357 | 2357 | | |
2358 | 2358 | | |
2359 | | - | |
2360 | | - | |
2361 | | - | |
2362 | | - | |
| 2359 | + | |
2363 | 2360 | | |
2364 | 2361 | | |
2365 | 2362 | | |
| |||
0 commit comments