Skip to content

Commit a33e487

Browse files
committed
Auto merge of #28555 - GuillaumeGomez:error_codes, r=Manishearth
2 parents d2faba2 + 6e1c675 commit a33e487

File tree

2 files changed

+5
-4
lines changed

2 files changed

+5
-4
lines changed

src/librustc_typeck/check/mod.rs

+3-3
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

+2-1
Original file line numberDiff line numberDiff line change
@@ -3354,5 +3354,6 @@ register_diagnostics! {
33543354
// type because its default value `{}` references the type `Self`"
33553355
E0399, // trait items need to be implemented because the associated
33563356
// type `{}` was overridden
3357-
E0436, // functional record update requires a struct
3357+
E0436, // functional record update requires a struct
3358+
E0513, // no type for local variable ..
33583359
}

0 commit comments

Comments
 (0)