Skip to content

Commit cbc6d35

Browse files
committed
privacy: update visit_infer
1 parent b2d8f0c commit cbc6d35

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
@@ -1148,19 +1148,11 @@ impl<'tcx> Visitor<'tcx> for TypePrivacyVisitor<'tcx> {
11481148
if self.visit(ty).is_break() {
11491149
return;
11501150
}
1151+
} else {
1152+
// We don't do anything for const infers here.
11511153
}
11521154
} else {
1153-
let local_id = self.tcx.hir().local_def_id(inf.hir_id);
1154-
if let Some(did) = self.tcx.opt_const_param_of(local_id) {
1155-
if self.visit_def_id(did, "inferred", &"").is_break() {
1156-
return;
1157-
}
1158-
}
1159-
1160-
// FIXME see above note for same issue.
1161-
if self.visit(rustc_typeck::hir_ty_to_ty(self.tcx, &inf.to_ty())).is_break() {
1162-
return;
1163-
}
1155+
bug!("visit_infer without typeck_results");
11641156
}
11651157
intravisit::walk_inf(self, inf);
11661158
}

0 commit comments

Comments
 (0)