Skip to content

Commit 6e1c675

Browse files
Add error codes for librustc_typeck
1 parent 1adcfb8 commit 6e1c675

File tree

2 files changed

+5
-4
lines changed

2 files changed

+5
-4
lines changed

src/librustc_typeck/check/mod.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1308,9 +1308,9 @@ impl<'a, 'tcx> FnCtxt<'a, 'tcx> {
13081308
match self.inh.locals.borrow().get(&nid) {
13091309
Some(&t) => t,
13101310
None => {
1311-
self.tcx().sess.span_err(
1312-
span,
1313-
&format!("no type for local variable {}", nid));
1311+
span_err!(self.tcx().sess, span, E0513,
1312+
"no type for local variable {}",
1313+
nid);
13141314
self.tcx().types.err
13151315
}
13161316
}

src/librustc_typeck/diagnostics.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3344,5 +3344,6 @@ register_diagnostics! {
33443344
// type because its default value `{}` references the type `Self`"
33453345
E0399, // trait items need to be implemented because the associated
33463346
// type `{}` was overridden
3347-
E0436, // functional record update requires a struct
3347+
E0436, // functional record update requires a struct
3348+
E0513, // no type for local variable ..
33483349
}

0 commit comments

Comments
 (0)