1
Fork 0

Make call notation use autoderef. Fixes #18742.

This commit is contained in:
Niko Matsakis 2015-01-02 15:30:26 -05:00
parent c89417130f
commit dc97247d11
9 changed files with 268 additions and 135 deletions

View file

@ -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);