Skip to content

Commit a3c55ac

Browse files
committed
privacy: update visit_infer
1 parent c0aa0fa commit a3c55ac

File tree

1 file changed

+3
-11
lines changed
  • compiler/rustc_privacy/src

1 file changed

+3
-11
lines changed

compiler/rustc_privacy/src/lib.rs

+3-11
Original file line numberDiff line numberDiff line change
@@ -1250,19 +1250,11 @@ impl<'tcx> Visitor<'tcx> for TypePrivacyVisitor<'tcx> {
12501250
if self.visit(ty).is_break() {
12511251
return;
12521252
}
1253+
} else {
1254+
// We don't do anything for const infers here.
12531255
}
12541256
} else {
1255-
let local_id = self.tcx.hir().local_def_id(inf.hir_id);
1256-
if let Some(did) = self.tcx.opt_const_param_of(local_id) {
1257-
if self.visit_def_id(did, "inferred", &"").is_break() {
1258-
return;
1259-
}
1260-
}
1261-
1262-
// FIXME see above note for same issue.
1263-
if self.visit(rustc_typeck::hir_ty_to_ty(self.tcx, &inf.to_ty())).is_break() {
1264-
return;
1265-
}
1257+
bug!("visit_infer without typeck_results");
12661258
}
12671259
intravisit::walk_inf(self, inf);
12681260
}

0 commit comments

Comments
 (0)