Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Add error codes for librustc_typeck
  • Loading branch information
GuillaumeGomez committed Sep 20, 2015
1 parent 1adcfb8 commit 6e1c675
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
6 changes: 3 additions & 3 deletions src/librustc_typeck/check/mod.rs
Expand Up @@ -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
}
}
Expand Down
3 changes: 2 additions & 1 deletion src/librustc_typeck/diagnostics.rs
Expand Up @@ -3344,5 +3344,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 ..
}

0 comments on commit 6e1c675

Please sign in to comment.