Resolve infered types when complaining about unexpected call type

This commit is contained in:
Esteban Kuber 2021-09-23 11:37:29 +00:00
parent b8deb93b22
commit 072d107b43
3 changed files with 3 additions and 2 deletions

View File

@ -350,6 +350,7 @@ fn confirm_builtin_call(
}
}
let callee_ty = self.resolve_vars_if_possible(callee_ty);
let mut err = type_error_struct!(
self.tcx.sess,
callee_expr.span,

View File

@ -1,3 +1,3 @@
fn main() {
let _ = {42}(); //~ ERROR expected function, found `_`
let _ = {42}(); //~ ERROR expected function, found `{integer}`
}

View File

@ -1,4 +1,4 @@
error[E0618]: expected function, found `_`
error[E0618]: expected function, found `{integer}`
--> $DIR/call-block.rs:2:13
|
LL | let _ = {42}();