Skip to content

Commit 2fca8e5

Browse files
authored
Rollup merge of #130976 - matthiaskrgr:clonee, r=jieyouxu
remove couple redundant clones
2 parents 1d29bfc + e174b92 commit 2fca8e5

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

compiler/rustc_builtin_macros/src/deriving/smart_ptr.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -310,7 +310,7 @@ pub(crate) fn expand_deriving_smart_ptr(
310310
// Add the impl blocks for `DispatchFromDyn` and `CoerceUnsized`.
311311
let gen_args = vec![GenericArg::Type(alt_self_type.clone())];
312312
add_impl_block(impl_generics.clone(), sym::DispatchFromDyn, gen_args.clone());
313-
add_impl_block(impl_generics.clone(), sym::CoerceUnsized, gen_args.clone());
313+
add_impl_block(impl_generics.clone(), sym::CoerceUnsized, gen_args);
314314
}
315315

316316
fn contains_maybe_sized_bound_on_pointee(predicates: &[WherePredicate], pointee: Symbol) -> bool {

compiler/rustc_pattern_analysis/src/rustc.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -1027,7 +1027,7 @@ impl<'p, 'tcx: 'p> PatCx for RustcPatCtxt<'p, 'tcx> {
10271027
// Point at this range.
10281028
first_range: thir_pat.span,
10291029
// That's the gap that isn't covered.
1030-
max: gap_as_pat.to_string(),
1030+
max: gap_as_pat,
10311031
// Suggest `lo..=max` instead.
10321032
suggestion: suggested_range,
10331033
},

0 commit comments

Comments
 (0)