about summary refs log tree commit diff
path: root/src
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2015-09-21 04:24:06 +0000
committerbors <bors@rust-lang.org>2015-09-21 04:24:06 +0000
commita33e48771e75c82411da2c668366bec59cee718d (patch)
tree15ecfc6b4dcba6cbb86b99f7c619d1b8d5227944 /src
parentd2faba28c027a9e5f5925b403bfbdb34062624f0 (diff)
parent6e1c675ff084cf671aaa710f195b8498e1090f35 (diff)
downloadrust-a33e48771e75c82411da2c668366bec59cee718d.tar.gz
rust-a33e48771e75c82411da2c668366bec59cee718d.zip
Auto merge of #28555 - GuillaumeGomez:error_codes, r=Manishearth
Diffstat (limited to 'src')
-rw-r--r--src/librustc_typeck/check/mod.rs6
-rw-r--r--src/librustc_typeck/diagnostics.rs3
2 files changed, 5 insertions, 4 deletions
diff --git a/src/librustc_typeck/check/mod.rs b/src/librustc_typeck/check/mod.rs
index 6f1e2e283e7..fd03c11b474 100644
--- a/src/librustc_typeck/check/mod.rs
+++ b/src/librustc_typeck/check/mod.rs
@@ -1308,9 +1308,9 @@ impl<'a, 'tcx> FnCtxt<'a, 'tcx> {
         match self.inh.locals.borrow().get(&nid) {
             Some(&t) => t,
             None => {
-                self.tcx().sess.span_err(
-                    span,
-                    &format!("no type for local variable {}", nid));
+                span_err!(self.tcx().sess, span, E0513,
+                          "no type for local variable {}",
+                          nid);
                 self.tcx().types.err
             }
         }
diff --git a/src/librustc_typeck/diagnostics.rs b/src/librustc_typeck/diagnostics.rs
index 54724f61f86..3b08140612f 100644
--- a/src/librustc_typeck/diagnostics.rs
+++ b/src/librustc_typeck/diagnostics.rs
@@ -3354,5 +3354,6 @@ register_diagnostics! {
            // type because its default value `{}` references the type `Self`"
     E0399, // trait items need to be implemented because the associated
            // type `{}` was overridden
-    E0436,  // functional record update requires a struct
+    E0436, // functional record update requires a struct
+    E0513, // no type for local variable ..
 }