Resolve infered types when complaining about unexpected call type
This commit is contained in:
parent
b8deb93b22
commit
072d107b43
@ -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,
|
||||
|
@ -1,3 +1,3 @@
|
||||
fn main() {
|
||||
let _ = {42}(); //~ ERROR expected function, found `_`
|
||||
let _ = {42}(); //~ ERROR expected function, found `{integer}`
|
||||
}
|
||||
|
@ -1,4 +1,4 @@
|
||||
error[E0618]: expected function, found `_`
|
||||
error[E0618]: expected function, found `{integer}`
|
||||
--> $DIR/call-block.rs:2:13
|
||||
|
|
||||
LL | let _ = {42}();
|
||||
|
Loading…
Reference in New Issue
Block a user