1
Fork 0

Dogfood match_ref_pats for if let

This commit is contained in:
Seo Sanghyeon 2015-11-25 02:44:40 +09:00
parent b40e80f039
commit a3e8091e87
11 changed files with 21 additions and 21 deletions

View file

@ -125,7 +125,7 @@ fn check_len_zero(cx: &LateContext, span: Span, name: &Name,
fn has_is_empty(cx: &LateContext, expr: &Expr) -> bool {
/// get a ImplOrTraitItem and return true if it matches is_empty(self)
fn is_is_empty(cx: &LateContext, id: &ImplOrTraitItemId) -> bool {
if let &MethodTraitItemId(def_id) = id {
if let MethodTraitItemId(def_id) = *id {
if let ty::MethodTraitItem(ref method) =
cx.tcx.impl_or_trait_item(def_id) {
method.name.as_str() == "is_empty"