mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-22 14:55:26 +00:00
privacy: update visit_infer
This commit is contained in:
parent
b2d8f0c77d
commit
cbc6d35a57
@ -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);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user