mirror of
https://github.com/rust-lang/rust.git
synced 2026-05-29 20:46:07 +03:00
don't clone types that are copy (clippy::clone_on_copy)
This commit is contained in:
@@ -50,7 +50,7 @@ fn relate_with_variance<T: Relate<'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),
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user