about summary refs log tree commit diff
path: root/src/libsyntax/json.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/libsyntax/json.rs')
-rw-r--r--src/libsyntax/json.rs7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/libsyntax/json.rs b/src/libsyntax/json.rs
index 5cdea3aabbe..2423e1070fc 100644
--- a/src/libsyntax/json.rs
+++ b/src/libsyntax/json.rs
@@ -112,6 +112,13 @@ impl Emitter for JsonEmitter {
             panic!("failed to print notification: {:?}", e);
         }
     }
+
+    fn should_show_explain(&self) -> bool {
+        match self.json_rendered {
+            HumanReadableErrorType::Short(_) => false,
+            _ => true,
+        }
+    }
 }
 
 // The following data types are provided just for serialisation.