Skip to content

Commit e11c667

Browse files
committed
don't clone types that are copy (clippy::clone_on_copy)
1 parent e2a511f commit e11c667

File tree

1 file changed

+1
-1
lines changed
  • compiler/rustc_infer/src/infer

1 file changed

+1
-1
lines changed

compiler/rustc_infer/src/infer/lub.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ impl TypeRelation<'tcx> for Lub<'combine, 'infcx, 'tcx> {
5050
ty::Invariant => self.fields.equate(self.a_is_expected).relate(a, b),
5151
ty::Covariant => self.relate(a, b),
5252
// FIXME(#41044) -- not correct, need test
53-
ty::Bivariant => Ok(a.clone()),
53+
ty::Bivariant => Ok(a),
5454
ty::Contravariant => self.fields.glb(self.a_is_expected).relate(a, b),
5555
}
5656
}

0 commit comments

Comments
 (0)