mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-10-02 06:41:48 +00:00
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.
This commit is contained in:
parent
e3037c2631
commit
f1f45f9191
5 changed files with 85 additions and 6 deletions
|
@ -48,7 +48,7 @@ pub enum Literal {
|
|||
|
||||
#[derive(Debug, Clone, Eq, PartialEq)]
|
||||
pub enum Expr {
|
||||
/// This is produced if syntax tree does not have a required expression piece.
|
||||
/// This is produced if the syntax tree does not have a required expression piece.
|
||||
Missing,
|
||||
Path(Path),
|
||||
If {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue