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

View File

@ -1526,9 +1526,11 @@ pub fn local_ty(&self, span: Span, nid: ast::NodeId) -> Ty<'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
}
}