mirror of
https://github.com/servo/servo.git
synced 2025-06-09 17:13:24 +00:00
fix(script_plugins): Map::get_parent_item
now returns OwnerId
instead of LocalDefId
<https://github.com/rust-lang/rust/pull/102040>
This commit is contained in:
parent
e7c92e9627
commit
00f6b6f36e
1 changed files with 1 additions and 1 deletions
|
@ -234,7 +234,7 @@ impl<'tcx> LateLintPass<'tcx> for UnrootedPass {
|
||||||
/// must be #[unrooted_must_root_lint::must_root] themselves
|
/// must be #[unrooted_must_root_lint::must_root] themselves
|
||||||
fn check_variant(&mut self, cx: &LateContext, var: &hir::Variant) {
|
fn check_variant(&mut self, cx: &LateContext, var: &hir::Variant) {
|
||||||
let ref map = cx.tcx.hir();
|
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());
|
let attrs = cx.tcx.hir().attrs(parent_item.hir_id());
|
||||||
if !has_lint_attr(&self.symbols, &attrs, self.symbols.must_root) {
|
if !has_lint_attr(&self.symbols, &attrs, self.symbols.must_root) {
|
||||||
match var.data {
|
match var.data {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue