Upgrade rust to f93ab64d4a1a7ee91759a1594ab2a426b6cc657e/rustc-1.5.0-dev.

This commit is contained in:
Manish Goregaokar 2015-09-21 13:12:01 +05:30 committed by Ms2ger
parent 8f1469eb08
commit 3c969b346a
40 changed files with 253 additions and 253 deletions

View file

@ -2,9 +2,10 @@
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
use rustc::lint::{Context, LintPass, LintArray, Level};
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;
@ -21,9 +22,11 @@ impl LintPass for InheritancePass {
fn get_lints(&self) -> LintArray {
lint_array!(INHERITANCE_INTEGRITY)
}
}
fn check_struct_def(&mut self, cx: &Context, def: &ast::StructDef, _i: ast::Ident,
_gen: &ast::Generics, id: ast::NodeId) {
impl LateLintPass for InheritancePass {
fn check_struct_def(&mut self, cx: &LateContext, def: &hir::StructDef, _i: ast::Ident,
_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") {
@ -43,7 +46,7 @@ impl LintPass for InheritancePass {
.map(|(_, f)| f.span);
// Find all #[dom_struct] fields
let dom_spans: Vec<_> = def.fields.iter().enumerate().filter_map(|(ctr, f)| {
if let ast::TyPath(..) = f.node.ty.node {
if let hir::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 cx.tcx.has_attr(def_id, "_dom_struct_marker") {