Upgrade Rust to rustc 1.4.0-nightly (a5d33d891 2015-08-08) (fixes #123)

This commit is contained in:
Manish Goregaokar 2015-08-09 22:13:56 +05:30
parent 48a9ed9b33
commit 228f06a960
3 changed files with 4 additions and 4 deletions

View File

@ -1,6 +1,6 @@
[package]
name = "clippy"
version = "0.0.8"
version = "0.0.9"
authors = [
"Manish Goregaokar <manishsmail@gmail.com>",
"Andre Bogus <bogusandre@gmail.com>"

View File

@ -144,7 +144,7 @@ fn has_is_empty(cx: &Context, expr: &Expr) -> bool {
ty::TyProjection(_) => ty.ty_to_def_id().map_or(false,
|id| has_is_empty_impl(cx, &id)),
ty::TyEnum(ref id, _) | ty::TyStruct(ref id, _) =>
has_is_empty_impl(cx, id),
has_is_empty_impl(cx, &id.did),
ty::TyArray(..) => true,
_ => false,
}

View File

@ -38,8 +38,8 @@ impl LintPass for StringAdd {
}
fn is_string(cx: &Context, e: &Expr) -> bool {
if let TyStruct(def_id, _) = walk_ty(cx.tcx.expr_ty(e)).sty {
match_def_path(cx, def_id, &["std", "string", "String"])
if let TyStruct(did, _) = walk_ty(cx.tcx.expr_ty(e)).sty {
match_def_path(cx, did.did, &["std", "string", "String"])
} else { false }
}