Skip to content

Commit c8ff353

Browse files
committed
ensure some hir parts
1 parent 2f282c6 commit c8ff353

File tree

2 files changed

+13
-8
lines changed

2 files changed

+13
-8
lines changed

compiler/rustc_interface/src/passes.rs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -743,6 +743,9 @@ pub fn create_global_ctxt<'tcx>(
743743
/// Runs the type-checking, region checking and other miscellaneous analysis
744744
/// passes on the crate.
745745
fn analysis(tcx: TyCtxt<'_>, (): ()) -> Result<()> {
746+
tcx.ensure().hir_crate_items(());
747+
tcx.ensure().stability_index(());
748+
746749
rustc_passes::hir_id_validator::check_crate(tcx);
747750

748751
let sess = tcx.sess;

compiler/rustc_middle/src/lint.rs

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -117,14 +117,15 @@ impl ShallowLintLevelMap {
117117
/// Perform a deep probe in the HIR tree looking for the actual level for the lint.
118118
/// This lint level is not usable for diagnostics, it needs to be corrected by
119119
/// `reveal_actual_level` beforehand.
120-
#[instrument(level = "trace", skip(self, tcx), ret)]
120+
// #[instrument(level = "trace", skip(self, tcx), ret)]
121121
fn probe_for_lint_level(
122122
&self,
123-
tcx: TyCtxt<'_>,
124-
id: LintId,
125-
start: HirId,
123+
_tcx: TyCtxt<'_>,
124+
_id: LintId,
125+
_start: HirId,
126126
) -> (Option<Level>, LintLevelSource) {
127-
if let Some(map) = self.specs.get(&start.local_id)
127+
return (Some(Level::Allow), LintLevelSource::Default)
128+
/*if let Some(map) = self.specs.get(&start.local_id)
128129
&& let Some(&(level, src)) = map.get(&id)
129130
{
130131
return (Some(level), src);
@@ -145,7 +146,7 @@ impl ShallowLintLevelMap {
145146
}
146147
}
147148
148-
(None, LintLevelSource::Default)
149+
(None, LintLevelSource::Default)*/
149150
}
150151

151152
/// Fetch and return the user-visible lint level for the given lint at the given HirId.
@@ -166,8 +167,9 @@ impl ShallowLintLevelMap {
166167

167168
impl TyCtxt<'_> {
168169
/// Fetch and return the user-visible lint level for the given lint at the given HirId.
169-
pub fn lint_level_at_node(self, lint: &'static Lint, id: HirId) -> (Level, LintLevelSource) {
170-
self.shallow_lint_levels_on(id.owner).lint_level_id_at_node(self, LintId::of(lint), id)
170+
pub fn lint_level_at_node(self, _lint: &'static Lint, _id: HirId) -> (Level, LintLevelSource) {
171+
return (Level::Allow, LintLevelSource::Default)
172+
//self.shallow_lint_levels_on(id.owner).lint_level_id_at_node(self, LintId::of(lint), id)
171173
}
172174
}
173175

0 commit comments

Comments
 (0)