diff options
| author | Nick Cameron <ncameron@mozilla.com> | 2015-12-21 10:00:43 +1300 |
|---|---|---|
| committer | Nick Cameron <ncameron@mozilla.com> | 2015-12-30 14:27:59 +1300 |
| commit | 95dc7efad0df3640096a48a84c1d7a29044be750 (patch) | |
| tree | 0d63c8598508c8892f7e8b84c7ecd242371b27b5 /src/libsyntax/diagnostics/plugin.rs | |
| parent | 253a1cefd8a9db926ca2d983dde5234504c86b4b (diff) | |
| download | rust-95dc7efad0df3640096a48a84c1d7a29044be750.tar.gz rust-95dc7efad0df3640096a48a84c1d7a29044be750.zip | |
use structured errors
Diffstat (limited to 'src/libsyntax/diagnostics/plugin.rs')
| -rw-r--r-- | src/libsyntax/diagnostics/plugin.rs | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/libsyntax/diagnostics/plugin.rs b/src/libsyntax/diagnostics/plugin.rs index be0d5729c70..d17ca3892dc 100644 --- a/src/libsyntax/diagnostics/plugin.rs +++ b/src/libsyntax/diagnostics/plugin.rs @@ -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) => { |
