From f439a24ca2bd55fd339063544f77e31c842ad83a Mon Sep 17 00:00:00 2001 From: Guillaume Gomez Date: Fri, 9 Dec 2016 09:42:12 -0800 Subject: [PATCH] Fix linter issue --- src/librustc_typeck/check/demand.rs | 2 +- src/librustc_typeck/check/method/probe.rs | 7 ++++--- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/src/librustc_typeck/check/demand.rs b/src/librustc_typeck/check/demand.rs index 17d1bd777973..393d9341a084 100644 --- a/src/librustc_typeck/check/demand.rs +++ b/src/librustc_typeck/check/demand.rs @@ -115,7 +115,7 @@ impl<'a, 'gcx, 'tcx> FnCtxt<'a, 'gcx, 'tcx> { Def::Method(def_id) => { match self.tcx.item_type(def_id).sty { ty::TypeVariants::TyFnDef(_, _, fty) => { - fty.sig.skip_binder().inputs.len() == 1 + fty.sig.skip_binder().inputs().len() == 1 } _ => false, } diff --git a/src/librustc_typeck/check/method/probe.rs b/src/librustc_typeck/check/method/probe.rs index c29c46d146ed..06158366f5cd 100644 --- a/src/librustc_typeck/check/method/probe.rs +++ b/src/librustc_typeck/check/method/probe.rs @@ -20,8 +20,8 @@ use rustc::ty::subst::{Subst, Substs}; use rustc::traits::{self, ObligationCause}; use rustc::ty::{self, Ty, ToPolyTraitRef, TraitRef, TypeFoldable}; use rustc::infer::type_variable::TypeVariableOrigin; -use rustc::util::nodemap::{FnvHashSet, FxHashSet}; -use rustc::infer::{self, InferOk, TypeOrigin}; +use rustc::util::nodemap::FxHashSet; +use rustc::infer::{self, InferOk}; use syntax::ast; use syntax_pos::Span; use rustc::hir; @@ -182,7 +182,8 @@ impl<'a, 'gcx, 'tcx> FnCtxt<'a, 'gcx, 'tcx> { method_names .iter() .flat_map(|&method_name| { - match self.probe_for_name(span, mode, method_name, IsSuggestion(true), self_ty, scope_expr_id) { + match self.probe_for_name(span, mode, method_name, IsSuggestion(true), self_ty, + scope_expr_id) { Ok(pick) => Some(pick.item), Err(_) => None, }