diff options
| author | Mark Rousskov <mark.simulacrum@gmail.com> | 2019-11-15 08:32:31 -0500 |
|---|---|---|
| committer | Mark Rousskov <mark.simulacrum@gmail.com> | 2019-11-15 08:45:43 -0500 |
| commit | 3f93ffc3334b77cc9025f68dfcea92098987abf3 (patch) | |
| tree | 8e532f41f4ddb5f1203d29c4b17114f70694ad3a /src/libsyntax/json.rs | |
| parent | 942f0a6f7a82facc30501232e28759cab54a21b3 (diff) | |
| download | rust-3f93ffc3334b77cc9025f68dfcea92098987abf3.tar.gz rust-3f93ffc3334b77cc9025f68dfcea92098987abf3.zip | |
Remove SourceMapper trait
SourceMap is now in the root of all rustc-specific crates, syntax_pos, so there's no need for the trait object to decouple the dependencies between librustc_errors and libsyntax as was needed previously.
Diffstat (limited to 'src/libsyntax/json.rs')
| -rw-r--r-- | src/libsyntax/json.rs | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/libsyntax/json.rs b/src/libsyntax/json.rs index 0b157938375..6096a930acf 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, SourceMapperDyn}; +use errors::{SubDiagnostic, CodeSuggestion}; use errors::{DiagnosticId, Applicability}; use errors::emitter::{Emitter, HumanReadableErrorType}; @@ -31,7 +31,7 @@ mod tests; pub struct JsonEmitter { dst: Box<dyn Write + Send>, registry: Option<Registry>, - sm: Lrc<dyn SourceMapper + sync::Send + sync::Sync>, + sm: Lrc<SourceMap>, pretty: bool, ui_testing: bool, json_rendered: HumanReadableErrorType, @@ -116,7 +116,7 @@ impl Emitter for JsonEmitter { } } - fn source_map(&self) -> Option<&Lrc<SourceMapperDyn>> { + fn source_map(&self) -> Option<&Lrc<SourceMap>> { Some(&self.sm) } |
