Skip to content

Commit

Permalink
Fix linter issue
Browse files Browse the repository at this point in the history
  • Loading branch information
GuillaumeGomez committed Dec 20, 2016
1 parent 6ea1fbb commit f439a24
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
2 changes: 1 addition & 1 deletion src/librustc_typeck/check/demand.rs
Expand Up @@ -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,
}
Expand Down
7 changes: 4 additions & 3 deletions src/librustc_typeck/check/method/probe.rs
Expand Up @@ -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;
Expand Down Expand Up @@ -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,
}
Expand Down

0 comments on commit f439a24

Please sign in to comment.