summaryrefslogtreecommitdiffstats
path: root/tests/ui-fulldeps/auxiliary/issue-40001-plugin.rs
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-17 12:19:50 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-17 12:19:50 +0000
commit2e00214b3efbdfeefaa0fe9e8b8fd519de7adc35 (patch)
treed325add32978dbdc1db975a438b3a77d571b1ab8 /tests/ui-fulldeps/auxiliary/issue-40001-plugin.rs
parentReleasing progress-linux version 1.68.2+dfsg1-1~progress7.99u1. (diff)
downloadrustc-2e00214b3efbdfeefaa0fe9e8b8fd519de7adc35.tar.xz
rustc-2e00214b3efbdfeefaa0fe9e8b8fd519de7adc35.zip
Merging upstream version 1.69.0+dfsg1.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to '')
-rw-r--r--tests/ui-fulldeps/auxiliary/issue-40001-plugin.rs4
1 files changed, 3 insertions, 1 deletions
diff --git a/tests/ui-fulldeps/auxiliary/issue-40001-plugin.rs b/tests/ui-fulldeps/auxiliary/issue-40001-plugin.rs
index c05443488..3f6caecaa 100644
--- a/tests/ui-fulldeps/auxiliary/issue-40001-plugin.rs
+++ b/tests/ui-fulldeps/auxiliary/issue-40001-plugin.rs
@@ -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]
@@ -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),