diff options
Diffstat (limited to 'components/plugins/lints/inheritance_integrity.rs')
-rw-r--r-- | components/plugins/lints/inheritance_integrity.rs | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/components/plugins/lints/inheritance_integrity.rs b/components/plugins/lints/inheritance_integrity.rs index 0c70a949c15..28dea9aeb41 100644 --- a/components/plugins/lints/inheritance_integrity.rs +++ b/components/plugins/lints/inheritance_integrity.rs @@ -27,7 +27,7 @@ impl<'a, 'tcx> LateLintPass<'a, 'tcx> for InheritancePass { _gen: &hir::Generics, id: ast::NodeId) { // Lints are run post expansion, so it's fine to use // #[_dom_struct_marker] here without also checking for #[dom_struct] - if cx.tcx.has_attr(cx.tcx.map.local_def_id(id), "_dom_struct_marker") { + if cx.tcx.has_attr(cx.tcx.hir.local_def_id(id), "_dom_struct_marker") { // Find the reflector, if any let reflector_span = def.fields().iter().enumerate() .find(|&(ctr, f)| { @@ -66,7 +66,7 @@ impl<'a, 'tcx> LateLintPass<'a, 'tcx> for InheritancePass { if let Some(sp) = reflector_span { if dom_spans.len() > 0 { let mut db = cx.struct_span_lint(INHERITANCE_INTEGRITY, - cx.tcx.map.expect_item(id).span, + cx.tcx.hir.expect_item(id).span, "This DOM struct has both Reflector \ and bare DOM struct members"); if cx.current_level(INHERITANCE_INTEGRITY) != Level::Allow { @@ -79,7 +79,7 @@ impl<'a, 'tcx> LateLintPass<'a, 'tcx> for InheritancePass { // Nor should we have more than one dom struct field } else if dom_spans.len() > 1 { let mut db = cx.struct_span_lint(INHERITANCE_INTEGRITY, - cx.tcx.map.expect_item(id).span, + cx.tcx.hir.expect_item(id).span, "This DOM struct has multiple \ DOM struct members, only one is allowed"); if cx.current_level(INHERITANCE_INTEGRITY) != Level::Allow { @@ -88,7 +88,7 @@ impl<'a, 'tcx> LateLintPass<'a, 'tcx> for InheritancePass { } } } else if dom_spans.is_empty() { - cx.span_lint(INHERITANCE_INTEGRITY, cx.tcx.map.expect_item(id).span, + cx.span_lint(INHERITANCE_INTEGRITY, cx.tcx.hir.expect_item(id).span, "This DOM struct has no reflector or parent DOM struct"); } } |