Upgrade to rustc 1.3.0-dev (f3b97a74a 2015-07-03)

This commit is contained in:
Simon Sapin 2015-07-03 15:14:08 +02:00 committed by Ms2ger
parent 02d84a1347
commit 75e3e787f6
15 changed files with 96 additions and 116 deletions

View file

@ -4,7 +4,7 @@
use syntax::{ast, ast_util};
use rustc::lint::{Context, LintPass, LintArray, Level};
use rustc::middle::{ty, def};
use rustc::middle::def;
use utils::match_lang_ty;
@ -26,7 +26,7 @@ impl LintPass for InheritancePass {
_gen: &ast::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 ty::has_attr(cx.tcx, ast_util::local_def(id), "_dom_struct_marker") {
if cx.tcx.has_attr(ast_util::local_def(id), "_dom_struct_marker") {
// Find the reflector, if any
let reflector_span = def.fields.iter().enumerate()
.find(|&(ctr, f)| {
@ -46,7 +46,7 @@ impl LintPass for InheritancePass {
if let ast::TyPath(..) = f.node.ty.node {
if let Some(&def::PathResolution { base_def: def::DefTy(def_id, _), .. }) =
cx.tcx.def_map.borrow().get(&f.node.ty.id) {
if ty::has_attr(cx.tcx, def_id, "_dom_struct_marker") {
if cx.tcx.has_attr(def_id, "_dom_struct_marker") {
// If the field is not the first, it's probably
// being misused (a)
if ctr > 0 {