mirror of
https://github.com/servo/servo.git
synced 2025-07-24 07:40:27 +01:00
Rust upgrade to nightly 20151002
This commit is contained in:
parent
ba2714f4f6
commit
48b3259c90
8 changed files with 52 additions and 54 deletions
|
@ -4,7 +4,6 @@
|
|||
|
||||
use rustc::lint::{LateContext, LintPass, LintArray, Level, LateLintPass, LintContext};
|
||||
use rustc::middle::def;
|
||||
use rustc::middle::def_id::DefId;
|
||||
use rustc_front::hir;
|
||||
use syntax::ast;
|
||||
use utils::match_lang_ty;
|
||||
|
@ -25,11 +24,11 @@ impl LintPass for InheritancePass {
|
|||
}
|
||||
|
||||
impl LateLintPass for InheritancePass {
|
||||
fn check_struct_def(&mut self, cx: &LateContext, def: &hir::StructDef, _i: ast::Ident,
|
||||
fn check_struct_def(&mut self, cx: &LateContext, def: &hir::StructDef, _n: ast::Name,
|
||||
_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(DefId::local(id), "_dom_struct_marker") {
|
||||
if cx.tcx.has_attr(cx.tcx.map.local_def_id(id), "_dom_struct_marker") {
|
||||
// Find the reflector, if any
|
||||
let reflector_span = def.fields.iter().enumerate()
|
||||
.find(|&(ctr, f)| {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue