Separate bindings from other patterns in HIR
This commit is contained in:
parent
ab7c35fa0f
commit
216f5fba04
29 changed files with 230 additions and 300 deletions
|
|
@ -2578,7 +2578,7 @@ fn name_from_pat(p: &hir::Pat) -> String {
|
|||
|
||||
match p.node {
|
||||
PatKind::Wild => "_".to_string(),
|
||||
PatKind::Ident(_, ref p, _) => p.node.to_string(),
|
||||
PatKind::Binding(_, ref p, _) => p.node.to_string(),
|
||||
PatKind::TupleStruct(ref p, _, _) | PatKind::Path(ref p) => path_to_string(p),
|
||||
PatKind::QPath(..) => panic!("tried to get argument name from PatKind::QPath, \
|
||||
which is not allowed in function arguments"),
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue