about summary refs log tree commit diff
path: root/src/libsyntax/json.rs
diff options
context:
space:
mode:
authorMark Rousskov <mark.simulacrum@gmail.com>2019-11-15 08:32:31 -0500
committerMark Rousskov <mark.simulacrum@gmail.com>2019-11-15 08:45:43 -0500
commit3f93ffc3334b77cc9025f68dfcea92098987abf3 (patch)
tree8e532f41f4ddb5f1203d29c4b17114f70694ad3a /src/libsyntax/json.rs
parent942f0a6f7a82facc30501232e28759cab54a21b3 (diff)
downloadrust-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.rs6
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)
     }