Skip to content

Commit

Permalink
Rename variables in rustc’s SelectionContext::copy_clone_conditions
Browse files Browse the repository at this point in the history
  • Loading branch information
SimonSapin committed Mar 23, 2018
1 parent 00721de commit 1efe0b3
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions src/librustc/traits/select.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 1efe0b3

Please sign in to comment.