diff options
| author | Camille GILLOT <gillot.camille@gmail.com> | 2021-08-26 18:42:08 +0200 |
|---|---|---|
| committer | Camille GILLOT <gillot.camille@gmail.com> | 2021-09-02 19:08:58 +0200 |
| commit | 7ec973d9ce7bc02577efde54929ad38bcf5a40eb (patch) | |
| tree | 5056ed7a189839f58b35412ad02cf53158fcd65c /compiler/rustc_lint | |
| parent | ad3407f482d29f26c67700974d86f89b3f2ab993 (diff) | |
Stop using walk_crate.
Diffstat (limited to 'compiler/rustc_lint')
| -rw-r--r-- | compiler/rustc_lint/src/late.rs | 5 | ||||
| -rw-r--r-- | compiler/rustc_lint/src/levels.rs | 2 |
2 files changed, 3 insertions, 4 deletions
diff --git a/compiler/rustc_lint/src/late.rs b/compiler/rustc_lint/src/late.rs index 30400da86b4..fe98bffaaee 100644 --- a/compiler/rustc_lint/src/late.rs +++ b/compiler/rustc_lint/src/late.rs @@ -451,9 +451,8 @@ fn late_lint_pass_crate<'tcx, T: LateLintPass<'tcx>>(tcx: TyCtxt<'tcx>, pass: T) // since the root module isn't visited as an item (because it isn't an // item), warn for it here. lint_callback!(cx, check_crate, krate); - - hir_visit::walk_crate(cx, krate); - + tcx.hir().walk_crate(cx); + tcx.hir().walk_attributes(cx); lint_callback!(cx, check_crate_post, krate); }) } diff --git a/compiler/rustc_lint/src/levels.rs b/compiler/rustc_lint/src/levels.rs index 90bf34ee863..267d2aa5382 100644 --- a/compiler/rustc_lint/src/levels.rs +++ b/compiler/rustc_lint/src/levels.rs @@ -37,7 +37,7 @@ fn lint_levels(tcx: TyCtxt<'_>, (): ()) -> LintLevelMap { let push = builder.levels.push(tcx.hir().attrs(hir::CRATE_HIR_ID), &store, true); builder.levels.register_id(hir::CRATE_HIR_ID); - intravisit::walk_crate(&mut builder, krate); + tcx.hir().walk_crate(&mut builder); builder.levels.pop(push); builder.levels.build_map() |
