Skip to content

Commit

Permalink
Adapt ui-fulldeps.
Browse files Browse the repository at this point in the history
  • Loading branch information
cjgillot committed Jan 28, 2023
1 parent 15d6325 commit 1aab86e
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion tests/ui-fulldeps/auxiliary/issue-40001-plugin.rs
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ use rustc_hir as hir;
use rustc_hir::intravisit;
use rustc_hir::Node;
use rustc_lint::{LateContext, LateLintPass, LintContext};
use rustc_span::def_id::LocalDefId;
use rustc_span::source_map;

#[no_mangle]
Expand All @@ -40,8 +41,9 @@ impl<'tcx> LateLintPass<'tcx> for MissingAllowedAttrPass {
_: &'tcx hir::FnDecl,
_: &'tcx hir::Body,
span: source_map::Span,
id: hir::HirId,
def_id: LocalDefId,
) {
let id = cx.tcx.hir().local_def_id_to_hir_id(def_id);
let item = match cx.tcx.hir().get(id) {
Node::Item(item) => item,
_ => cx.tcx.hir().expect_item(cx.tcx.hir().get_parent_item(id).def_id),
Expand Down

0 comments on commit 1aab86e

Please sign in to comment.