Auto merge of #79729 - matthiaskrgr:clones_, r=jyn514
remove redundant clones
This commit is contained in:
commit
4d26de6891
3 changed files with 3 additions and 3 deletions
|
@ -505,7 +505,7 @@ impl<'cx, 'tcx> Canonicalizer<'cx, 'tcx> {
|
||||||
let canon_value = Canonical {
|
let canon_value = Canonical {
|
||||||
max_universe: ty::UniverseIndex::ROOT,
|
max_universe: ty::UniverseIndex::ROOT,
|
||||||
variables: List::empty(),
|
variables: List::empty(),
|
||||||
value: value.clone(),
|
value,
|
||||||
};
|
};
|
||||||
return canon_value;
|
return canon_value;
|
||||||
}
|
}
|
||||||
|
|
|
@ -581,7 +581,7 @@ impl<'tcx> TyCtxt<'tcx> {
|
||||||
let mut const_map = FxHashMap::default();
|
let mut const_map = FxHashMap::default();
|
||||||
|
|
||||||
if !value.has_escaping_bound_vars() {
|
if !value.has_escaping_bound_vars() {
|
||||||
(value.clone(), region_map)
|
(value, region_map)
|
||||||
} else {
|
} else {
|
||||||
let mut real_fld_r = |br| *region_map.entry(br).or_insert_with(|| fld_r(br));
|
let mut real_fld_r = |br| *region_map.entry(br).or_insert_with(|| fld_r(br));
|
||||||
|
|
||||||
|
|
|
@ -49,7 +49,7 @@ impl<'cx, 'tcx> AtExt<'tcx> for At<'cx, 'tcx> {
|
||||||
self.param_env,
|
self.param_env,
|
||||||
);
|
);
|
||||||
if !value.has_projections() {
|
if !value.has_projections() {
|
||||||
return Ok(Normalized { value: value.clone(), obligations: vec![] });
|
return Ok(Normalized { value, obligations: vec![] });
|
||||||
}
|
}
|
||||||
|
|
||||||
let mut normalizer = QueryNormalizer {
|
let mut normalizer = QueryNormalizer {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue