Skip to content

Commit

Permalink
don't clone types that are copy (clippy::clone_on_copy)
Browse files Browse the repository at this point in the history
  • Loading branch information
matthiaskrgr committed Sep 10, 2020
1 parent e2a511f commit e11c667
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion compiler/rustc_infer/src/infer/lub.rs
Expand Up @@ -50,7 +50,7 @@ impl TypeRelation<'tcx> for Lub<'combine, 'infcx, 'tcx> {
ty::Invariant => self.fields.equate(self.a_is_expected).relate(a, b),
ty::Covariant => self.relate(a, b),
// FIXME(#41044) -- not correct, need test
ty::Bivariant => Ok(a.clone()),
ty::Bivariant => Ok(a),
ty::Contravariant => self.fields.glb(self.a_is_expected).relate(a, b),
}
}
Expand Down

0 comments on commit e11c667

Please sign in to comment.