From 00f6b6f36e0290bada4f5f8fce788ae33131609a Mon Sep 17 00:00:00 2001 From: yvt Date: Thu, 13 Oct 2022 20:10:42 +0900 Subject: [PATCH] fix(script_plugins): `Map::get_parent_item` now returns `OwnerId` instead of `LocalDefId` --- components/script_plugins/lib.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/components/script_plugins/lib.rs b/components/script_plugins/lib.rs index e6bad197e23..895bf94de8e 100644 --- a/components/script_plugins/lib.rs +++ b/components/script_plugins/lib.rs @@ -234,7 +234,7 @@ impl<'tcx> LateLintPass<'tcx> for UnrootedPass { /// must be #[unrooted_must_root_lint::must_root] themselves fn check_variant(&mut self, cx: &LateContext, var: &hir::Variant) { let ref map = cx.tcx.hir(); - let parent_item = map.expect_item(map.get_parent_item(var.id)); + let parent_item = map.expect_item(map.get_parent_item(var.id).def_id); let attrs = cx.tcx.hir().attrs(parent_item.hir_id()); if !has_lint_attr(&self.symbols, &attrs, self.symbols.must_root) { match var.data {