Add `print::PatKind::Print`

This will allow for the gradual removal of all other variants.
This commit is contained in:
Zalathar 2024-08-03 20:30:25 +10:00
parent 0a777090d8
commit f53eb2724d
1 changed files with 3 additions and 0 deletions

View File

@ -62,6 +62,8 @@ pub(crate) enum PatKind<'tcx> {
},
Never,
Print(String),
}
impl<'tcx> fmt::Display for Pat<'tcx> {
@ -79,6 +81,7 @@ impl<'tcx> fmt::Display for Pat<'tcx> {
PatKind::Slice { ref prefix, has_dot_dot, ref suffix } => {
write_slice_like(f, prefix, has_dot_dot, suffix)
}
PatKind::Print(ref string) => write!(f, "{string}"),
}
}
}