Skip to content

Commit 1aab86e

Browse files
committed
Adapt ui-fulldeps.
1 parent 15d6325 commit 1aab86e

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

Diff for: tests/ui-fulldeps/auxiliary/issue-40001-plugin.rs

+3-1
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ use rustc_hir as hir;
1616
use rustc_hir::intravisit;
1717
use rustc_hir::Node;
1818
use rustc_lint::{LateContext, LateLintPass, LintContext};
19+
use rustc_span::def_id::LocalDefId;
1920
use rustc_span::source_map;
2021

2122
#[no_mangle]
@@ -40,8 +41,9 @@ impl<'tcx> LateLintPass<'tcx> for MissingAllowedAttrPass {
4041
_: &'tcx hir::FnDecl,
4142
_: &'tcx hir::Body,
4243
span: source_map::Span,
43-
id: hir::HirId,
44+
def_id: LocalDefId,
4445
) {
46+
let id = cx.tcx.hir().local_def_id_to_hir_id(def_id);
4547
let item = match cx.tcx.hir().get(id) {
4648
Node::Item(item) => item,
4749
_ => cx.tcx.hir().expect_item(cx.tcx.hir().get_parent_item(id).def_id),

0 commit comments

Comments
 (0)