]> git.lizzy.rs Git - rust.git/commitdiff
Upgrade Rust to rustc 1.4.0-nightly (a5d33d891 2015-08-08) (fixes #123)
authorManish Goregaokar <manishsmail@gmail.com>
Sun, 9 Aug 2015 16:43:56 +0000 (22:13 +0530)
committerManish Goregaokar <manishsmail@gmail.com>
Sun, 9 Aug 2015 16:46:39 +0000 (22:16 +0530)
Cargo.toml
src/len_zero.rs
src/strings.rs

index c94e1b385268b382c17e3bea0b9b3c41e42d0906..ce9ea2b3ed3ed3f278870eb9e8b4b91bd2e315f9 100644 (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>"
index 0e139983bbfff5cfb83bfabd02bfb5e2d517701b..37683bbfa53ae8d355e6f9f497680649fdd57934 100644 (file)
@@ -144,7 +144,7 @@ fn has_is_empty_impl(cx: &Context, id: &DefId) -> 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,
        }
index 75133ec125457050ec4b3080b7b983028216e135..511d123b58d207953cc20fd8a4b5e534976e690d 100644 (file)
@@ -38,8 +38,8 @@ fn check_expr(&mut self, cx: &Context, e: &Expr) {
 }
 
 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 }
 }