Add print::PatKind::Print
This will allow for the gradual removal of all other variants.
This commit is contained in:
parent
0a777090d8
commit
f53eb2724d
@ -62,6 +62,8 @@ pub(crate) enum PatKind<'tcx> {
|
|||||||
},
|
},
|
||||||
|
|
||||||
Never,
|
Never,
|
||||||
|
|
||||||
|
Print(String),
|
||||||
}
|
}
|
||||||
|
|
||||||
impl<'tcx> fmt::Display for Pat<'tcx> {
|
impl<'tcx> fmt::Display for Pat<'tcx> {
|
||||||
@ -79,6 +81,7 @@ fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
|
|||||||
PatKind::Slice { ref prefix, has_dot_dot, ref suffix } => {
|
PatKind::Slice { ref prefix, has_dot_dot, ref suffix } => {
|
||||||
write_slice_like(f, prefix, has_dot_dot, suffix)
|
write_slice_like(f, prefix, has_dot_dot, suffix)
|
||||||
}
|
}
|
||||||
|
PatKind::Print(ref string) => write!(f, "{string}"),
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user