about summary refs log tree commit diff
path: root/compiler/rustc_pattern_analysis/src
diff options
context:
space:
mode:
authorMatthias Krüger <matthias.krueger@famsik.de>2024-09-28 15:11:23 +0200
committerGitHub <noreply@github.com>2024-09-28 15:11:23 +0200
commit2fca8e5ae7b6cbd90ad40e8e0a1142e2e36e6e51 (patch)
treebdb8fe0a06cc7572501f03ba439cdb263510c554 /compiler/rustc_pattern_analysis/src
parent1d29bfc562978f4379181c573d0c520e831d2e0e (diff)
parente174b92cb45138dcea93727e64f2255ae39cd5bf (diff)
downloadrust-2fca8e5ae7b6cbd90ad40e8e0a1142e2e36e6e51.tar.gz
rust-2fca8e5ae7b6cbd90ad40e8e0a1142e2e36e6e51.zip
Rollup merge of #130976 - matthiaskrgr:clonee, r=jieyouxu
remove couple redundant clones
Diffstat (limited to 'compiler/rustc_pattern_analysis/src')
-rw-r--r--compiler/rustc_pattern_analysis/src/rustc.rs2
1 files changed, 1 insertions, 1 deletions
diff --git a/compiler/rustc_pattern_analysis/src/rustc.rs b/compiler/rustc_pattern_analysis/src/rustc.rs
index 72737fb98cb..70a9319d666 100644
--- a/compiler/rustc_pattern_analysis/src/rustc.rs
+++ b/compiler/rustc_pattern_analysis/src/rustc.rs
@@ -1027,7 +1027,7 @@ impl<'p, 'tcx: 'p> PatCx for RustcPatCtxt<'p, 'tcx> {
                     // Point at this range.
                     first_range: thir_pat.span,
                     // That's the gap that isn't covered.
-                    max: gap_as_pat.to_string(),
+                    max: gap_as_pat,
                     // Suggest `lo..=max` instead.
                     suggestion: suggested_range,
                 },