Skip to content

Commit

Permalink
privacy: update visit_infer
Browse files Browse the repository at this point in the history
  • Loading branch information
lcnr committed Jan 18, 2022
1 parent b2d8f0c commit cbc6d35
Showing 1 changed file with 3 additions and 11 deletions.
14 changes: 3 additions & 11 deletions compiler/rustc_privacy/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1148,19 +1148,11 @@ impl<'tcx> Visitor<'tcx> for TypePrivacyVisitor<'tcx> {
if self.visit(ty).is_break() {
return;
}
} else {
// We don't do anything for const infers here.
}
} else {
let local_id = self.tcx.hir().local_def_id(inf.hir_id);
if let Some(did) = self.tcx.opt_const_param_of(local_id) {
if self.visit_def_id(did, "inferred", &"").is_break() {
return;
}
}

// FIXME see above note for same issue.
if self.visit(rustc_typeck::hir_ty_to_ty(self.tcx, &inf.to_ty())).is_break() {
return;
}
bug!("visit_infer without typeck_results");
}
intravisit::walk_inf(self, inf);
}
Expand Down

0 comments on commit cbc6d35

Please sign in to comment.