Do not fetch HIR node when iterating to find lint.
This commit is contained in:
parent
2cb9a65684
commit
c9c6c507b7
2 changed files with 13 additions and 9 deletions
|
@ -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);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue