Split PatKind::Enum into PatKind::TupleStruct and PatKind::Path
This commit is contained in:
parent
9b40e1e5b3
commit
06755d90ce
22 changed files with 137 additions and 142 deletions
|
|
@ -2554,7 +2554,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::Enum(ref p, _) => path_to_string(p),
|
||||
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"),
|
||||
PatKind::Struct(ref name, ref fields, etc) => {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue