Skip to content

Commit 00f6b6f

Browse files
committed
fix(script_plugins): Map::get_parent_item now returns OwnerId instead of LocalDefId
<rust-lang/rust#102040>
1 parent e7c92e9 commit 00f6b6f

File tree

1 file changed

+1
-1
lines changed
  • components/script_plugins

1 file changed

+1
-1
lines changed

components/script_plugins/lib.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -234,7 +234,7 @@ impl<'tcx> LateLintPass<'tcx> for UnrootedPass {
234234
/// must be #[unrooted_must_root_lint::must_root] themselves
235235
fn check_variant(&mut self, cx: &LateContext, var: &hir::Variant) {
236236
let ref map = cx.tcx.hir();
237-
let parent_item = map.expect_item(map.get_parent_item(var.id));
237+
let parent_item = map.expect_item(map.get_parent_item(var.id).def_id);
238238
let attrs = cx.tcx.hir().attrs(parent_item.hir_id());
239239
if !has_lint_attr(&self.symbols, &attrs, self.symbols.must_root) {
240240
match var.data {

0 commit comments

Comments
 (0)