about summary refs log tree commit diff
path: root/src/libsyntax/json.rs
diff options
context:
space:
mode:
authorEsteban Küber <esteban@kuber.com.ar>2019-10-13 21:48:39 -0700
committerEsteban Küber <esteban@kuber.com.ar>2019-10-13 21:48:39 -0700
commit4bb771615e194e64d0fc9cd97c1cdcc4972a1771 (patch)
treec5f7fcb29adf6e80ebe2fe23a8066b95cdec7757 /src/libsyntax/json.rs
parent898f36c83cc28d7921a1d7b3605323dc5cfcf533 (diff)
downloadrust-4bb771615e194e64d0fc9cd97c1cdcc4972a1771.tar.gz
rust-4bb771615e194e64d0fc9cd97c1cdcc4972a1771.zip
Bring attention to suggestions when the only difference is capitalization
Diffstat (limited to 'src/libsyntax/json.rs')
-rw-r--r--src/libsyntax/json.rs6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/libsyntax/json.rs b/src/libsyntax/json.rs
index 2423e1070fc..4cf987417b8 100644
--- a/src/libsyntax/json.rs
+++ b/src/libsyntax/json.rs
@@ -12,7 +12,7 @@
 use crate::source_map::{SourceMap, FilePathMapping};
 
 use errors::registry::Registry;
-use errors::{SubDiagnostic, CodeSuggestion, SourceMapper};
+use errors::{SubDiagnostic, CodeSuggestion, SourceMapper, SourceMapperDyn};
 use errors::{DiagnosticId, Applicability};
 use errors::emitter::{Emitter, HumanReadableErrorType};
 
@@ -113,6 +113,10 @@ impl Emitter for JsonEmitter {
         }
     }
 
+    fn source_map(&self) -> Option<&Lrc<SourceMapperDyn>> {
+        Some(&self.sm)
+    }
+
     fn should_show_explain(&self) -> bool {
         match self.json_rendered {
             HumanReadableErrorType::Short(_) => false,