Repository navigation
Don't ICE when a guard condition is a place of type ! - #165745
lapla-cogito wants to merge 1 commit into
Conversation
|
r? @mu001999 rustbot has assigned @mu001999. Use Why was this reviewer chosen?The reviewer was selected based on:
|
|
But removing the parentheses would not lead to success (play): #![feature(guard_patterns)]
#![expect(incomplete_features)]
fn main() {
let x: !;
match 1 {
(y if x) => {}
}
}would give I think the behaviors should be consistent. |
But is this really an issue that should be fixed with this patch? It seems like something that should be handled on the parser side. (Of course I can work on a follow-up PR later for this.) @rustbot reviewer |
I think it is reasonable. And I find #164465 would support this. Thanks! @bors r+ rollup |
This comment was marked as outdated.
This comment was marked as outdated.
…u001999 Don't ICE when a guard condition is a place of type `!` Fixes rust-lang#165169
…uwer Rollup of 18 pull requests Successful merges: - #164828 (When suggesting path of renamed crate, use the renamed name) - #164864 (Avoid hoisting uninitialized reads in EarlyOtherwiseBranch) - #165068 (Change color usage for highlights) - #165221 (Canonicalize more comparison operators) - #165841 (Tell Miri about the alignment handling in the Windows System allocator) - #165869 (Cleanup: Remove `path_matches` and `value_str` from `AttributeExt`) - #165880 (Remove dead code for returning `BackendRepr::Memory` with `PassMode::Direct`) - #164108 (Add unstable `-Zllvm-tpde` flag to `rustc_codegen_llvm`) - #165565 (view-types: lower view types from HIR) - #165622 (small cleanups in rustc_codegen_llvm) - #165745 (Don't ICE when a guard condition is a place of type `!`) - #165771 (tests: cover MSVC ThinLTO exported symbol preservation) - #165810 (reflection: reflect attributes from adts, fields, and variants) - #165823 (Tweak crate error wording and turn them into fatal errors) - #165849 (More opt-dist improvements) - #165855 (Update `sysinfo` version to `0.40.3`) - #165872 (Some attribute related cleanups) - #165905 (CI: Use a consistent locale when sorting docker build inputs)
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
| //@check-pass | ||
|
|
||
| #![feature(guard_patterns)] | ||
|
|
||
| fn main() { | ||
| let x: !; | ||
| match 1 { | ||
| ((y if x)) => {} | ||
| } | ||
| } |
There was a problem hiding this comment.
I don't get this. This should definitely not compile. What is even going on here?
|
This pull request was unapproved. |
Fixes #165169