[package]
name = "clippy"
-version = "0.0.8"
+version = "0.0.9"
authors = [
"Manish Goregaokar <manishsmail@gmail.com>",
"Andre Bogus <bogusandre@gmail.com>"
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,
}
}
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 }
}