diff options
| author | Camille GILLOT <gillot.camille@gmail.com> | 2023-01-22 18:45:37 +0000 |
|---|---|---|
| committer | Camille GILLOT <gillot.camille@gmail.com> | 2023-01-28 09:55:27 +0000 |
| commit | 1aab86eae2f9e3e442f39577bd1bd62bccd8cc0c (patch) | |
| tree | e05068d5dc16369802c7a04a0e2f3f20735eaee9 | |
| parent | 15d6325747d9e37b5e8f19718eada0d5307fdef2 (diff) | |
| download | rust-1aab86eae2f9e3e442f39577bd1bd62bccd8cc0c.tar.gz rust-1aab86eae2f9e3e442f39577bd1bd62bccd8cc0c.zip | |
Adapt ui-fulldeps.
| -rw-r--r-- | tests/ui-fulldeps/auxiliary/issue-40001-plugin.rs | 4 |
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 c05443488c3..3f6caecaa5a 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), |
