-
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
Remove wrong assertion in match checking. #111015
Conversation
Thanks for fixing this and letting me know, but I don't understand the code in question and I'm pretty sure I don't have permissions to approve this even if I wanted to. (It's odd that rustbot let you assign me 🤔) I agree with the beta nomination, we already know of one crate in the wild that this surely affects ( |
r? compiler |
let-chains can't be grouped by parentheses, and && is left-to-right associative, so I actually don't see a case where we'd encounter a nested let in this part of the code, since we already "recurse" on the lhs in the loop below the code you touched. Seems fine to me, and even if I'm misunderstanding some subtle AST case, this would just regress a lint. r? @compiler-errors @bors r+ |
…iaskrgr Rollup of 6 pull requests Successful merges: - rust-lang#110823 (Tweak await span to not contain dot) - rust-lang#111015 (Remove wrong assertion in match checking.) - rust-lang#111023 (Test precise capture with a multi-variant enum and exhaustive patterns) - rust-lang#111032 (Migrate `builtin_macros::asm` diagnostics to translatable diagnostics) - rust-lang#111033 (Ping Nadrieril when changing exhaustiveness checking) - rust-lang#111037 (Close parentheses for `offset_of` in AST pretty printing) Failed merges: r? `@ghost` `@rustbot` modify labels: rollup
…k-Simulacrum [beta] backport This PR backports: - rust-lang#111015: Remove wrong assertion in match checking. - rust-lang#110917: only error combining +whole-archive and +bundle for rlibs - rust-lang#111201: bootstrap: add .gitmodules to the sources r? `@Mark-Simulacrum`
This assertions is completely misguided, introduced by #108504. The responsible PR is on beta, nominating for backport.
Instead of checking that this is not a
&&
, it would make sense to check that neither arms of that&&
is alet
. This seems like a lot of code for unclear benefit.r? @saethlin