diff options
| author | bors <bors@rust-lang.org> | 2022-09-18 00:46:14 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2022-09-18 00:46:14 +0000 |
| commit | bc7b17cfe3bf08b618d1c7b64838053faeb1f590 (patch) | |
| tree | 2e843ccff581c0eaaf21b293912eeaca4c8a4775 /compiler/rustc_middle/src/lint.rs | |
| parent | 5253b0a0a1f366fad0ebed57597fcf2703b9e893 (diff) | |
| parent | c9c6c507b785ea74a69fc716ac1512283bdb76e3 (diff) | |
| download | rust-bc7b17cfe3bf08b618d1c7b64838053faeb1f590.tar.gz rust-bc7b17cfe3bf08b618d1c7b64838053faeb1f590.zip | |
Auto merge of #101862 - cjgillot:lint-regression, r=oli-obk
Do not fetch HIR node when iterating to find lint. Addresses the regression in https://github.com/rust-lang/rust/pull/101620
Diffstat (limited to 'compiler/rustc_middle/src/lint.rs')
| -rw-r--r-- | compiler/rustc_middle/src/lint.rs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/compiler/rustc_middle/src/lint.rs b/compiler/rustc_middle/src/lint.rs index 4cb5ef79177..bb9e1edf86c 100644 --- a/compiler/rustc_middle/src/lint.rs +++ b/compiler/rustc_middle/src/lint.rs @@ -126,7 +126,7 @@ impl ShallowLintLevelMap { return (Some(level), src); } - for (parent, _) in tcx.hir().parent_iter(start) { + for parent in tcx.hir().parent_id_iter(start) { let specs = tcx.shallow_lint_levels_on(parent); if let Some(&(level, src)) = specs.specs.get(&id) { return (Some(level), src); |
