This commit is contained in:
parent
48a9ed9b33
commit
228f06a960
@ -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>"
|
||||
|
@ -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,
|
||||
}
|
||||
|
@ -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 }
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user