Update E0513 to new error format

This commit is contained in:
Guillaume Gomez 2016-09-25 19:37:54 +02:00
parent 1e4e81c320
commit 96a0f06b2f
1 changed files with 5 additions and 3 deletions

View File

@ -1526,9 +1526,11 @@ impl<'a, 'gcx, 'tcx> FnCtxt<'a, 'gcx, 'tcx> {
match self.locals.borrow().get(&nid) {
Some(&t) => t,
None => {
span_err!(self.tcx.sess, span, E0513,
"no type for local variable {}",
nid);
struct_span_err!(self.tcx.sess, span, E0513,
"no type for local variable {}",
self.tcx.map.node_to_string(nid))
.span_label(span, &"no type for variable")
.emit();
self.tcx.types.err
}
}