File tree Expand file tree Collapse file tree 2 files changed +4
-4
lines changed
crates/ra_hir_ty/src/infer Expand file tree Collapse file tree 2 files changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -38,8 +38,8 @@ impl<'a> InferenceContext<'a> {
38
38
// Special case: two function types. Try to coerce both to
39
39
// pointers to have a chance at getting a match. See
40
40
// https://github.com/rust-lang/rust/blob/7b805396bf46dce972692a6846ce2ad8481c5f85/src/librustc_typeck/check/coercion.rs#L877-L916
41
- let sig1 = self . callable_sig ( ty1 ) . expect ( "FnDef without callable sig" ) ;
42
- let sig2 = self . callable_sig ( ty2 ) . expect ( "FnDef without callable sig" ) ;
41
+ let sig1 = ty1 . callable_sig ( self . db ) . expect ( "FnDef without callable sig" ) ;
42
+ let sig2 = ty2 . callable_sig ( self . db ) . expect ( "FnDef without callable sig" ) ;
43
43
let ptr_ty1 = Ty :: fn_ptr ( sig1) ;
44
44
let ptr_ty2 = Ty :: fn_ptr ( sig2) ;
45
45
self . coerce_merge_branch ( & ptr_ty1, & ptr_ty2)
@@ -93,7 +93,7 @@ impl<'a> InferenceContext<'a> {
93
93
94
94
// `{function_type}` -> `fn()`
95
95
( ty_app ! ( TypeCtor :: FnDef ( _) ) , ty_app ! ( TypeCtor :: FnPtr { .. } ) ) => {
96
- match self . callable_sig ( & from_ty ) {
96
+ match from_ty . callable_sig ( self . db ) {
97
97
None => return false ,
98
98
Some ( sig) => {
99
99
from_ty = Ty :: fn_ptr ( sig) ;
Original file line number Diff line number Diff line change @@ -768,7 +768,7 @@ impl<'a> InferenceContext<'a> {
768
768
let method_ty = method_ty. subst ( & substs) ;
769
769
let method_ty = self . insert_type_vars ( method_ty) ;
770
770
self . register_obligations_for_call ( & method_ty) ;
771
- let ( expected_receiver_ty, param_tys, ret_ty) = match self . callable_sig ( & method_ty ) {
771
+ let ( expected_receiver_ty, param_tys, ret_ty) = match method_ty . callable_sig ( self . db ) {
772
772
Some ( sig) => {
773
773
if !sig. params ( ) . is_empty ( ) {
774
774
( sig. params ( ) [ 0 ] . clone ( ) , sig. params ( ) [ 1 ..] . to_vec ( ) , sig. ret ( ) . clone ( ) )
You can’t perform that action at this time.
0 commit comments