Upgrade to rustc 1.17.0-nightly (ea7a6486a 2017-02-04)

This commit is contained in:
Simon Sapin 2017-02-02 17:43:58 +01:00
parent fb7f65fc57
commit 1aa0b16299
4 changed files with 16 additions and 14 deletions

View file

@ -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");
}
}