Skip to content

Commit b925925

Browse files
committed
Split PatKind::Enum into PatKind::TupleStruct and PatKind::Path
1 parent 3343a65 commit b925925

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

clean/mod.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2554,7 +2554,7 @@ fn name_from_pat(p: &hir::Pat) -> String {
25542554
match p.node {
25552555
PatKind::Wild => "_".to_string(),
25562556
PatKind::Ident(_, ref p, _) => p.node.to_string(),
2557-
PatKind::Enum(ref p, _) => path_to_string(p),
2557+
PatKind::TupleStruct(ref p, _) | PatKind::Path(ref p) => path_to_string(p),
25582558
PatKind::QPath(..) => panic!("tried to get argument name from PatKind::QPath, \
25592559
which is not allowed in function arguments"),
25602560
PatKind::Struct(ref name, ref fields, etc) => {

0 commit comments

Comments
 (0)