aboutsummaryrefslogtreecommitdiffstats
path: root/components/plugins/lints/inheritance_integrity.rs
diff options
context:
space:
mode:
authorSimon Sapin <simon.sapin@exyr.org>2017-02-02 17:43:58 +0100
committerSimon Sapin <simon.sapin@exyr.org>2017-02-05 15:14:05 +0100
commit1aa0b16299e09692a1de5bacd5d92f9e498158a9 (patch)
treef2c18bc6b3303005a4686c9a1fd46c486ac74a53 /components/plugins/lints/inheritance_integrity.rs
parentfb7f65fc5711f41b991b72ed97d7286dd16301ed (diff)
downloadservo-1aa0b16299e09692a1de5bacd5d92f9e498158a9.tar.gz
servo-1aa0b16299e09692a1de5bacd5d92f9e498158a9.zip
Upgrade to rustc 1.17.0-nightly (ea7a6486a 2017-02-04)
Diffstat (limited to 'components/plugins/lints/inheritance_integrity.rs')
-rw-r--r--components/plugins/lints/inheritance_integrity.rs8
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");
}
}