diff options
| author | Esteban Küber <esteban@kuber.com.ar> | 2019-10-13 21:48:39 -0700 |
|---|---|---|
| committer | Esteban Küber <esteban@kuber.com.ar> | 2019-10-13 21:48:39 -0700 |
| commit | 4bb771615e194e64d0fc9cd97c1cdcc4972a1771 (patch) | |
| tree | c5f7fcb29adf6e80ebe2fe23a8066b95cdec7757 /src/libsyntax/json.rs | |
| parent | 898f36c83cc28d7921a1d7b3605323dc5cfcf533 (diff) | |
| download | rust-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.rs | 6 |
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, |
