Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion compiler/rustc_infer/src/infer/canonical/canonicalizer.rs
Original file line number Diff line number Diff line change
Expand Up @@ -505,7 +505,7 @@ impl<'cx, 'tcx> Canonicalizer<'cx, 'tcx> {
let canon_value = Canonical {
max_universe: ty::UniverseIndex::ROOT,
variables: List::empty(),
value: value.clone(),
value,
};
return canon_value;
}
Expand Down
2 changes: 1 addition & 1 deletion compiler/rustc_middle/src/ty/fold.rs
Original file line number Diff line number Diff line change
Expand Up @@ -581,7 +581,7 @@ impl<'tcx> TyCtxt<'tcx> {
let mut const_map = FxHashMap::default();

if !value.has_escaping_bound_vars() {
(value.clone(), region_map)
(value, region_map)
} else {
let mut real_fld_r = |br| *region_map.entry(br).or_insert_with(|| fld_r(br));

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ impl<'cx, 'tcx> AtExt<'tcx> for At<'cx, 'tcx> {
self.param_env,
);
if !value.has_projections() {
return Ok(Normalized { value: value.clone(), obligations: vec![] });
return Ok(Normalized { value, obligations: vec![] });
}

let mut normalizer = QueryNormalizer {
Expand Down