1
Fork 0

use structured errors

This commit is contained in:
Nick Cameron 2015-12-21 10:00:43 +13:00
parent 253a1cefd8
commit 95dc7efad0
70 changed files with 2033 additions and 1548 deletions

View file

@ -62,10 +62,10 @@ pub fn expand_diagnostic_used<'cx>(ecx: &'cx mut ExtCtxt,
match diagnostics.get_mut(&code.name) {
// Previously used errors.
Some(&mut ErrorInfo { description: _, use_site: Some(previous_span) }) => {
ecx.span_warn(span, &format!(
ecx.struct_span_warn(span, &format!(
"diagnostic code {} already used", code
));
ecx.span_note(previous_span, "previous invocation");
)).span_note(previous_span, "previous invocation")
.emit();
}
// Newly used errors.
Some(ref mut info) => {