about summary refs log tree commit diff
path: root/compiler/rustc_mir_build/src
diff options
context:
space:
mode:
authorZalathar <Zalathar@users.noreply.github.com>2024-07-28 15:12:14 +1000
committerZalathar <Zalathar@users.noreply.github.com>2024-07-28 21:58:44 +1000
commite1fc4a997ddac2b949ef6bb4037f1fb196c44f08 (patch)
treebd3a0d1949705432a4fe0949eb76a0b756055301 /compiler/rustc_mir_build/src
parent3148b35f6a6226548929c12da529ab0d1a4b47d5 (diff)
downloadrust-e1fc4a997ddac2b949ef6bb4037f1fb196c44f08.tar.gz
rust-e1fc4a997ddac2b949ef6bb4037f1fb196c44f08.zip
Don't store `thir::Pat` in error structs
In several cases this avoids the need to clone the underlying pattern, and then
print the clone later.
Diffstat (limited to 'compiler/rustc_mir_build/src')
-rw-r--r--compiler/rustc_mir_build/src/errors.rs2
1 files changed, 1 insertions, 1 deletions
diff --git a/compiler/rustc_mir_build/src/errors.rs b/compiler/rustc_mir_build/src/errors.rs
index bdc4b0ea97d..2e508829fbe 100644
--- a/compiler/rustc_mir_build/src/errors.rs
+++ b/compiler/rustc_mir_build/src/errors.rs
@@ -856,7 +856,7 @@ pub(crate) struct PatternNotCovered<'s, 'tcx> {
     pub(crate) span: Span,
     pub(crate) origin: &'s str,
     #[subdiagnostic]
-    pub(crate) uncovered: Uncovered<'tcx>,
+    pub(crate) uncovered: Uncovered,
     #[subdiagnostic]
     pub(crate) inform: Option<Inform>,
     #[subdiagnostic]