Skip to content

Commit

Permalink
Update E0513 to new error format
Browse files Browse the repository at this point in the history
  • Loading branch information
GuillaumeGomez committed Sep 26, 2016
1 parent 1e4e81c commit 96a0f06
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions src/librustc_typeck/check/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
}
Expand Down

0 comments on commit 96a0f06

Please sign in to comment.