From 3f94a90c7bbc1b3116a7960ae9f25ebe35d68ad0 Mon Sep 17 00:00:00 2001 From: adamrk Date: Sun, 7 Jun 2020 21:57:29 +0200 Subject: Infer FnSig from Fn traits --- crates/ra_hir_ty/src/traits/builtin.rs | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'crates/ra_hir_ty/src/traits') diff --git a/crates/ra_hir_ty/src/traits/builtin.rs b/crates/ra_hir_ty/src/traits/builtin.rs index 88a422d2c..b05e679ad 100644 --- a/crates/ra_hir_ty/src/traits/builtin.rs +++ b/crates/ra_hir_ty/src/traits/builtin.rs @@ -360,7 +360,11 @@ fn super_trait_object_unsize_impl_datum( BuiltinImplData { num_vars, trait_ref, where_clauses: Vec::new(), assoc_ty_values: Vec::new() } } -fn get_fn_trait(db: &dyn HirDatabase, krate: CrateId, fn_trait: super::FnTrait) -> Option { +pub fn get_fn_trait( + db: &dyn HirDatabase, + krate: CrateId, + fn_trait: super::FnTrait, +) -> Option { let target = db.lang_item(krate, fn_trait.lang_item_name().into())?; match target { LangItemTarget::TraitId(t) => Some(t), -- cgit v1.2.3