-
Notifications
You must be signed in to change notification settings - Fork 12.7k
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
Fix lint scoping for let-else. #102257
Fix lint scoping for let-else. #102257
Conversation
(rust-highfive has picked a reviewer for you, use r? to override) |
This looks quite right. Sorry for the confusion! |
@bors r=dingxiangfei2009 |
…gfei2009 Fix lint scoping for let-else. The scoping for let-else is inconsistent with HIR nesting. This creates cases, in `ui/let-else/let-else-allow-unused.rs` for instance, where an `allow` lint attribute does not apply to the bindings created by `let-else`. This PR is an attempt to correct this. As there is no lint that currently relies on this, the test for this behaviour is rust-lang#101500. cc `@dingxiangfei2009` as you filed rust-lang#101894
☀️ Test successful - checks-actions |
Finished benchmarking commit (1d1f142): comparison URL. Overall result: ✅ improvements - no action needed@rustbot label: -perf-regression Instruction countThis is a highly reliable metric that was used to determine the overall result at the top of this comment.
Max RSS (memory usage)ResultsThis is a less reliable metric that may be of interest but was not used to determine the overall result at the top of this comment.
CyclesThis benchmark run did not return any relevant results for this metric. Footnotes |
The scoping for let-else is inconsistent with HIR nesting. This creates cases, in
ui/let-else/let-else-allow-unused.rs
for instance, where anallow
lint attribute does not apply to the bindings created bylet-else
.This PR is an attempt to correct this.
As there is no lint that currently relies on this, the test for this behaviour is #101500.
cc @dingxiangfei2009 as you filed #101894