don't clone types that are copy (clippy::clone_on_copy)

This commit is contained in:
Matthias Krüger 2020-09-10 13:20:33 +02:00
parent e2a511fe20
commit e11c667e4a
1 changed files with 1 additions and 1 deletions

View File

@ -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),
}
}