-
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
resolve: record pattern def when resolve_pattern
returns Err(true)
#33967
Conversation
…h` returns `Err(true)` In 1a374b8, (pr rust-lang#33046) fixed the error reporting of a specific case, but the change that was introduced did not make sure that `record_def` was called in all cases, which lead to an ICE in [1]. This change restores the original `else` case, but keeps the changes that were committed in 1a374b8. This commit fixes issue rust-lang#33293. [1] `rustc::middle::mem_categorization::MemCategorizationContext::cat_pattern_`
r? @jroesch (rust_highfive has picked a reviewer for you, use r? to override) |
N.b. I think that a test case should be added to this PR. This gist shows a suitable piece of code.
and the the same time not report:
|
resolve_pattern
returns Err(true)
resolve_pattern
returns Err(true)
r? @Manishearth |
LGTM. |
@bors r=petrochenkov |
📌 Commit cde0f94 has been approved by |
…, r=petrochenkov resolve: record pattern def when `resolve_pattern` returns `Err(true)` I propose a fix for issue rust-lang#33293. In 1a374b8, (pr rust-lang#33046) fixed the error reporting of a specific case, but the change that was introduced did not make sure that `record_def` was called in all cases, which lead to an ICE in [1]. This change restores the original `else` case, but keeps the changes that were committed in 1a374b8. [1] `rustc::middle::mem_categorization::MemCategorizationContext::cat_pattern_`
I propose a fix for issue #33293.
In 1a374b8, (pr #33046) fixed the error reporting of a specific case, but the change that was introduced did not make sure that
record_def
was called in all cases, which lead to an ICE in [1].This change restores the original
else
case, but keeps the changes that were committed in 1a374b8.[1]
rustc::middle::mem_categorization::MemCategorizationContext::cat_pattern_