-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
make else if
generate helpful error when condition have an issue
#8274
Conversation
It breaks the following
Because { $x = 300 } is parsed as a closure, and it doesn't allowed to capture mutable variable, a solution would be restrict closure syntax to not mess up with block syntax |
ahhhh, that makes sense now. I've been having problems with |
How can we resolve the remaining issues here? Do we need the block/closure separation to land? |
I've re-implement it and the implementation doesn't rely on #8273 |
Codecov Report
Additional details and impacted files@@ Coverage Diff @@
## main #8274 +/- ##
==========================================
+ Coverage 68.49% 68.51% +0.01%
==========================================
Files 620 620
Lines 99472 99488 +16
==========================================
+ Hits 68133 68160 +27
+ Misses 31339 31328 -11
|
Are we ready to break things with this? LOL |
Yeah, I think we can land it |
Description
Fixes: #7575
User-Facing Changes
Previously:
After:
Tests + Formatting
Don't forget to add tests that cover your changes.
Make sure you've run and fixed any issues with these commands:
cargo fmt --all -- --check
to check standard code formatting (cargo fmt --all
applies these changes)cargo clippy --workspace -- -D warnings -D clippy::unwrap_used -A clippy::needless_collect
to check that you're using the standard code stylecargo test --workspace
to check that all tests passAfter Submitting
If your PR had any user-facing changes, update the documentation after the PR is merged, if necessary. This will help us keep the docs up to date.