diff options
| author | Zalathar <Zalathar@users.noreply.github.com> | 2024-08-03 20:30:25 +1000 |
|---|---|---|
| committer | Zalathar <Zalathar@users.noreply.github.com> | 2024-08-11 19:57:30 +1000 |
| commit | f53eb2724de4e1a7ec0985d035c208c55c37dd78 (patch) | |
| tree | 8dd7531ce4b8b10afd32ffaeb6d04123ed35ff1a /compiler/rustc_pattern_analysis | |
| parent | 0a777090d80747fc841784c5a6944f2a792f845c (diff) | |
| download | rust-f53eb2724de4e1a7ec0985d035c208c55c37dd78.tar.gz rust-f53eb2724de4e1a7ec0985d035c208c55c37dd78.zip | |
Add `print::PatKind::Print`
This will allow for the gradual removal of all other variants.
Diffstat (limited to 'compiler/rustc_pattern_analysis')
| -rw-r--r-- | compiler/rustc_pattern_analysis/src/rustc/print.rs | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/compiler/rustc_pattern_analysis/src/rustc/print.rs b/compiler/rustc_pattern_analysis/src/rustc/print.rs index 94f625e0153..c929b9b808a 100644 --- a/compiler/rustc_pattern_analysis/src/rustc/print.rs +++ b/compiler/rustc_pattern_analysis/src/rustc/print.rs @@ -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}"), } } } |
