Unnamed repository; edit this file 'description' to name the repository.
Diffstat (limited to 'crates/hir-ty/src/mir/lower/pattern_matching.rs')
| -rw-r--r-- | crates/hir-ty/src/mir/lower/pattern_matching.rs | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/crates/hir-ty/src/mir/lower/pattern_matching.rs b/crates/hir-ty/src/mir/lower/pattern_matching.rs index ea0beef3c0..65ab12929d 100644 --- a/crates/hir-ty/src/mir/lower/pattern_matching.rs +++ b/crates/hir-ty/src/mir/lower/pattern_matching.rs @@ -331,10 +331,8 @@ impl MirLowerCtx<'_> { break 'b (c, x.1); } } - if let ResolveValueResult::ValueNs(v, _) = pr { - if let ValueNs::ConstId(c) = v { - break 'b (c, Substitution::empty(Interner)); - } + if let ResolveValueResult::ValueNs(ValueNs::ConstId(c), _) = pr { + break 'b (c, Substitution::empty(Interner)); } not_supported!("path in pattern position that is not const or variant") }; |