Skip to content

Commit f53eb27

Browse files
committed
Add print::PatKind::Print
This will allow for the gradual removal of all other variants.
1 parent 0a77709 commit f53eb27

File tree

1 file changed

+3
-0
lines changed
  • compiler/rustc_pattern_analysis/src/rustc

1 file changed

+3
-0
lines changed

compiler/rustc_pattern_analysis/src/rustc/print.rs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,8 @@ pub(crate) enum PatKind<'tcx> {
6262
},
6363

6464
Never,
65+
66+
Print(String),
6567
}
6668

6769
impl<'tcx> fmt::Display for Pat<'tcx> {
@@ -79,6 +81,7 @@ impl<'tcx> fmt::Display for Pat<'tcx> {
7981
PatKind::Slice { ref prefix, has_dot_dot, ref suffix } => {
8082
write_slice_like(f, prefix, has_dot_dot, suffix)
8183
}
84+
PatKind::Print(ref string) => write!(f, "{string}"),
8285
}
8386
}
8487
}

0 commit comments

Comments
 (0)