summary refs log tree commit diff
path: root/src/librustc_errors
diff options
context:
space:
mode:
authorOliver Schneider <git-spam-no-reply9815368754983@oli-obk.de>2017-10-24 08:37:41 +0200
committerOliver Schneider <git-spam-no-reply9815368754983@oli-obk.de>2017-11-02 10:19:41 +0100
commit88fb4c4fdad1b97c3499a26e24dcbc60c6853a80 (patch)
tree550cfd5f5273dc9635b3266fab87a6eddeb1c42d /src/librustc_errors
parent2379faa933923a97158a4939b9fc82dcbd45430f (diff)
downloadrust-88fb4c4fdad1b97c3499a26e24dcbc60c6853a80.tar.gz
rust-88fb4c4fdad1b97c3499a26e24dcbc60c6853a80.zip
Report lint names in json diagnostics
Diffstat (limited to 'src/librustc_errors')
-rw-r--r--src/librustc_errors/emitter.rs3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/librustc_errors/emitter.rs b/src/librustc_errors/emitter.rs
index 5db5a9a1133..356b3dadb7b 100644
--- a/src/librustc_errors/emitter.rs
+++ b/src/librustc_errors/emitter.rs
@@ -906,7 +906,8 @@ impl EmitterWriter {
         } else {
             buffer.append(0, &level.to_string(), Style::Level(level.clone()));
             match code {
-                &Some(ref code) => {
+                // only render error codes, not lint codes
+                &Some(ref code) if code.starts_with("E") && code.len() == 5 => {
                     buffer.append(0, "[", Style::Level(level.clone()));
                     buffer.append(0, &code, Style::Level(level.clone()));
                     buffer.append(0, "]", Style::Level(level.clone()));