Skip to content

Commit aa6e58b

Browse files
authoredJan 27, 2020
Rollup merge of #68459 - matthiaskrgr:clone_on_copy2, r=eddyb
don't clone types that are copy, round two. Apparently fixing some of these issues makes clippy find even more so I did a couple of rounds now. r? @eddyb
2 parents 8a79d08 + f7dcdcc commit aa6e58b

File tree

56 files changed

+155
-192
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

56 files changed

+155
-192
lines changed
 

‎src/librustc/infer/fudge.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ fn const_vars_since_snapshot<'tcx>(
1919
(
2020
range.start..range.end,
2121
(range.start.index..range.end.index)
22-
.map(|index| table.probe_value(ConstVid::from_index(index)).origin.clone())
22+
.map(|index| table.probe_value(ConstVid::from_index(index)).origin)
2323
.collect(),
2424
)
2525
}

‎src/librustc/infer/lexical_region_resolve/mod.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -611,7 +611,7 @@ impl<'cx, 'tcx> LexicalResolver<'cx, 'tcx> {
611611

612612
errors.push(RegionResolutionError::GenericBoundFailure(
613613
verify.origin.clone(),
614-
verify.kind.clone(),
614+
verify.kind,
615615
sub,
616616
));
617617
}
@@ -761,7 +761,7 @@ impl<'cx, 'tcx> LexicalResolver<'cx, 'tcx> {
761761

762762
for upper_bound in &upper_bounds {
763763
if !self.region_rels.is_subregion_of(effective_lower_bound, upper_bound.region) {
764-
let origin = self.var_infos[node_idx].origin.clone();
764+
let origin = self.var_infos[node_idx].origin;
765765
debug!(
766766
"region inference error at {:?} for {:?}: SubSupConflict sub: {:?} \
767767
sup: {:?}",

0 commit comments

Comments
 (0)