diff options
author | Florian Diebold <[email protected]> | 2020-02-21 15:56:34 +0000 |
---|---|---|
committer | Florian Diebold <[email protected]> | 2020-02-21 16:01:19 +0000 |
commit | f1f45f9191d60c52dbedec717aee0de4a0580bcc (patch) | |
tree | baebf708dcdc154fbe4fe903906e11e344a09802 /crates/ra_hir_def/src/expr.rs | |
parent | e3037c2631ecb55996b676ce2c18b9df1858abaa (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/expr.rs')
-rw-r--r-- | crates/ra_hir_def/src/expr.rs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/crates/ra_hir_def/src/expr.rs b/crates/ra_hir_def/src/expr.rs index 9707c5527..66d004717 100644 --- a/crates/ra_hir_def/src/expr.rs +++ b/crates/ra_hir_def/src/expr.rs | |||
@@ -48,7 +48,7 @@ pub enum Literal { | |||
48 | 48 | ||
49 | #[derive(Debug, Clone, Eq, PartialEq)] | 49 | #[derive(Debug, Clone, Eq, PartialEq)] |
50 | pub enum Expr { | 50 | pub enum Expr { |
51 | /// This is produced if syntax tree does not have a required expression piece. | 51 | /// This is produced if the syntax tree does not have a required expression piece. |
52 | Missing, | 52 | Missing, |
53 | Path(Path), | 53 | Path(Path), |
54 | If { | 54 | If { |