Make call notation use autoderef. Fixes #18742.
This commit is contained in:
parent
c89417130f
commit
dc97247d11
9 changed files with 268 additions and 135 deletions
|
@ -509,7 +509,7 @@ impl<'a, 'tcx> CFGBuilder<'a, 'tcx> {
|
|||
let method_call = ty::MethodCall::expr(call_expr.id);
|
||||
let return_ty = ty::ty_fn_ret(match self.tcx.method_map.borrow().get(&method_call) {
|
||||
Some(method) => method.ty,
|
||||
None => ty::expr_ty(self.tcx, func_or_rcvr)
|
||||
None => ty::expr_ty_adjusted(self.tcx, func_or_rcvr)
|
||||
});
|
||||
|
||||
let func_or_rcvr_exit = self.expr(func_or_rcvr, pred);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue