Upgrade Rust to rustc 1.8.0-nightly (18b851bc5 2016-01-22)

fixes #573
This commit is contained in:
Manish Goregaokar 2016-01-22 17:54:44 +05:30
parent 28b0437354
commit c86a5ccd2e
10 changed files with 20 additions and 20 deletions

View file

@ -1,5 +1,5 @@
use rustc::lint::{LateContext, LateLintPass, LintArray, LintPass};
use rustc::middle::def::{DefStruct, DefVariant};
use rustc::middle::def::Def;
use rustc_front::hir::{Expr, ExprCall, ExprLit, ExprPath, ExprStruct};
use rustc_front::hir::{Stmt, StmtSemi};
@ -36,8 +36,8 @@ fn has_no_effect(cx: &LateContext, expr: &Expr) -> bool {
ExprCall(ref callee, ref args) => {
let def = cx.tcx.def_map.borrow().get(&callee.id).map(|d| d.full_def());
match def {
Some(DefStruct(..)) |
Some(DefVariant(..)) => args.iter().all(|arg| has_no_effect(cx, arg)),
Some(Def::Struct(..)) |
Some(Def::Variant(..)) => args.iter().all(|arg| has_no_effect(cx, arg)),
_ => false,
}
}