aboutsummaryrefslogtreecommitdiff
path: root/crates/ra_hir_def/src/adt.rs
diff options
context:
space:
mode:
authorFlorian Diebold <[email protected]>2020-02-21 15:56:34 +0000
committerFlorian Diebold <[email protected]>2020-02-21 16:01:19 +0000
commitf1f45f9191d60c52dbedec717aee0de4a0580bcc (patch)
treebaebf708dcdc154fbe4fe903906e11e344a09802 /crates/ra_hir_def/src/adt.rs
parente3037c2631ecb55996b676ce2c18b9df1858abaa (diff)
Fix handling of const patterns
E.g. in `match x { None => ... }`, `None` is a path pattern (resolving to the option variant), not a binding. To determine this, we need to try to resolve the name during lowering. This isn't too hard since we already need to resolve names for macro expansion anyway (though maybe a bit hacky). Fixes #1618.
Diffstat (limited to 'crates/ra_hir_def/src/adt.rs')
-rw-r--r--crates/ra_hir_def/src/adt.rs1
1 files changed, 1 insertions, 0 deletions
diff --git a/crates/ra_hir_def/src/adt.rs b/crates/ra_hir_def/src/adt.rs
index 985f409e8..2bdfc2b8d 100644
--- a/crates/ra_hir_def/src/adt.rs
+++ b/crates/ra_hir_def/src/adt.rs
@@ -174,6 +174,7 @@ impl HasChildSource for VariantId {
174 } 174 }
175} 175}
176 176
177#[derive(Debug, Copy, Clone, PartialEq, Eq)]
177pub enum StructKind { 178pub enum StructKind {
178 Tuple, 179 Tuple,
179 Record, 180 Record,