Skip to content

Commit 96a0f06

Browse files
Update E0513 to new error format
1 parent 1e4e81c commit 96a0f06

File tree

1 file changed

+5
-3
lines changed
  • src/librustc_typeck/check

1 file changed

+5
-3
lines changed

src/librustc_typeck/check/mod.rs

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1526,9 +1526,11 @@ impl<'a, 'gcx, 'tcx> FnCtxt<'a, 'gcx, 'tcx> {
15261526
match self.locals.borrow().get(&nid) {
15271527
Some(&t) => t,
15281528
None => {
1529-
span_err!(self.tcx.sess, span, E0513,
1530-
"no type for local variable {}",
1531-
nid);
1529+
struct_span_err!(self.tcx.sess, span, E0513,
1530+
"no type for local variable {}",
1531+
self.tcx.map.node_to_string(nid))
1532+
.span_label(span, &"no type for variable")
1533+
.emit();
15321534
self.tcx.types.err
15331535
}
15341536
}

0 commit comments

Comments
 (0)