diff options
author | adamrk <[email protected]> | 2020-06-20 07:42:35 +0100 |
---|---|---|
committer | adamrk <[email protected]> | 2020-06-20 07:42:35 +0100 |
commit | 38f6cdbc8a83b081ad1cef9171e28431be09db01 (patch) | |
tree | c6f30deba5f85f35950a558e5290a0cf56601fc5 /crates/ra_hir_ty/src/infer | |
parent | cf870af8073e3a72fdfb1d36b017f0abd7593559 (diff) |
Make get_fn_trait a method of FnTrait
Diffstat (limited to 'crates/ra_hir_ty/src/infer')
-rw-r--r-- | crates/ra_hir_ty/src/infer/expr.rs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/crates/ra_hir_ty/src/infer/expr.rs b/crates/ra_hir_ty/src/infer/expr.rs index a23d8abd6..8c924ad42 100644 --- a/crates/ra_hir_ty/src/infer/expr.rs +++ b/crates/ra_hir_ty/src/infer/expr.rs | |||
@@ -15,7 +15,7 @@ use ra_syntax::ast::RangeOp; | |||
15 | 15 | ||
16 | use crate::{ | 16 | use crate::{ |
17 | autoderef, method_resolution, op, | 17 | autoderef, method_resolution, op, |
18 | traits::{builtin::get_fn_trait, FnTrait, InEnvironment, SolutionVariables}, | 18 | traits::{FnTrait, InEnvironment, SolutionVariables}, |
19 | utils::{generics, variant_data, Generics}, | 19 | utils::{generics, variant_data, Generics}, |
20 | ApplicationTy, Binders, CallableDef, FnSig, InferTy, IntTy, Mutability, Obligation, Rawness, | 20 | ApplicationTy, Binders, CallableDef, FnSig, InferTy, IntTy, Mutability, Obligation, Rawness, |
21 | Substs, TraitRef, Ty, TypeCtor, | 21 | Substs, TraitRef, Ty, TypeCtor, |
@@ -67,7 +67,7 @@ impl<'a> InferenceContext<'a> { | |||
67 | if let Some(krate) = self.resolver.krate() { | 67 | if let Some(krate) = self.resolver.krate() { |
68 | let fn_traits: Vec<crate::TraitId> = [FnTrait::FnOnce, FnTrait::FnMut, FnTrait::Fn] | 68 | let fn_traits: Vec<crate::TraitId> = [FnTrait::FnOnce, FnTrait::FnMut, FnTrait::Fn] |
69 | .iter() | 69 | .iter() |
70 | .filter_map(|f| get_fn_trait(self.db, krate, *f)) | 70 | .filter_map(|f| f.get_id(self.db, krate)) |
71 | .collect(); | 71 | .collect(); |
72 | for fn_trait in fn_traits { | 72 | for fn_trait in fn_traits { |
73 | let fn_trait_data = self.db.trait_data(fn_trait); | 73 | let fn_trait_data = self.db.trait_data(fn_trait); |