mirror of
https://github.com/rust-lang/rust.git
synced 2025-05-14 02:49:40 +00:00
Rename variables in rustc’s SelectionContext::copy_clone_conditions
This commit is contained in:
parent
00721de714
commit
1efe0b3481
@ -2086,10 +2086,9 @@ impl<'cx, 'gcx, 'tcx> SelectionContext<'cx, 'gcx, 'tcx> {
|
||||
|
||||
ty::TyClosure(def_id, substs) => {
|
||||
let trait_id = obligation.predicate.def_id();
|
||||
let copy_closures = Some(trait_id) == self.tcx().lang_items().copy_trait();
|
||||
let clone_closures = Some(trait_id) == self.tcx().lang_items().clone_trait();
|
||||
|
||||
if copy_closures || clone_closures {
|
||||
let is_copy_trait = Some(trait_id) == self.tcx().lang_items().copy_trait();
|
||||
let is_clone_trait = Some(trait_id) == self.tcx().lang_items().clone_trait();
|
||||
if is_copy_trait || is_clone_trait {
|
||||
Where(ty::Binder(substs.upvar_tys(def_id, self.tcx()).collect()))
|
||||
} else {
|
||||
Never
|
||||
|
Loading…
Reference in New Issue
Block a user