From f53eb2724de4e1a7ec0985d035c208c55c37dd78 Mon Sep 17 00:00:00 2001 From: Zalathar Date: Sat, 3 Aug 2024 20:30:25 +1000 Subject: [PATCH] Add `print::PatKind::Print` This will allow for the gradual removal of all other variants. --- compiler/rustc_pattern_analysis/src/rustc/print.rs | 3 +++ 1 file changed, 3 insertions(+) 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}"), } } }