about summary refs log tree commit diff
path: root/src
diff options
context:
space:
mode:
authorGuillaume Gomez <guillaume1.gomez@gmail.com>2016-09-25 19:37:54 +0200
committerGuillaume Gomez <guillaume1.gomez@gmail.com>2016-09-26 20:52:01 +0200
commit96a0f06b2f4a62f825b91dbf630a4b8bd8f81749 (patch)
tree8d8e2a9abbd97d1cdbf6fa2f6feb388273f541bc /src
parent1e4e81c3200473842fa088f7549ff8f2419e321e (diff)
downloadrust-96a0f06b2f4a62f825b91dbf630a4b8bd8f81749.tar.gz
rust-96a0f06b2f4a62f825b91dbf630a4b8bd8f81749.zip
Update E0513 to new error format
Diffstat (limited to 'src')
-rw-r--r--src/librustc_typeck/check/mod.rs8
1 files changed, 5 insertions, 3 deletions
diff --git a/src/librustc_typeck/check/mod.rs b/src/librustc_typeck/check/mod.rs
index e406807b51c..c432d471803 100644
--- a/src/librustc_typeck/check/mod.rs
+++ b/src/librustc_typeck/check/mod.rs
@@ -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
             }
         }