about summary refs log tree commit diff
diff options
context:
space:
mode:
authorGuillaume Gomez <guillaume1.gomez@gmail.com>2016-12-09 09:42:12 -0800
committerGuillaume Gomez <guillaume1.gomez@gmail.com>2016-12-20 11:37:15 +0100
commitf439a24ca2bd55fd339063544f77e31c842ad83a (patch)
tree5dad4a3e2005376a3207dd56e2142a6e3a99e22d
parent6ea1fbb52bc2f82a78d7b592bdfed2b05e6fb666 (diff)
downloadrust-f439a24ca2bd55fd339063544f77e31c842ad83a.tar.gz
rust-f439a24ca2bd55fd339063544f77e31c842ad83a.zip
Fix linter issue
-rw-r--r--src/librustc_typeck/check/demand.rs2
-rw-r--r--src/librustc_typeck/check/method/probe.rs7
2 files changed, 5 insertions, 4 deletions
diff --git a/src/librustc_typeck/check/demand.rs b/src/librustc_typeck/check/demand.rs
index 17d1bd77797..393d9341a08 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 c29c46d146e..06158366f5c 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,
                 }