diff options
| author | Oliver Schneider <git-spam-no-reply9815368754983@oli-obk.de> | 2017-11-16 16:36:49 +0100 |
|---|---|---|
| committer | Oliver Schneider <git-spam-no-reply9815368754983@oli-obk.de> | 2017-11-16 16:36:49 +0100 |
| commit | 47c7e430d35fc5b49b36d2fb5b5a75497059b05b (patch) | |
| tree | a70915b851a69126eaf997066d83fad90032564d /src/libsyntax | |
| parent | c81f201d48c4f25d32f8b0f76103c9f794d37851 (diff) | |
| download | rust-47c7e430d35fc5b49b36d2fb5b5a75497059b05b.tar.gz rust-47c7e430d35fc5b49b36d2fb5b5a75497059b05b.zip | |
Remove left over dead code from suggestion diagnostic refactoring
Diffstat (limited to 'src/libsyntax')
| -rw-r--r-- | src/libsyntax/json.rs | 14 |
1 files changed, 2 insertions, 12 deletions
diff --git a/src/libsyntax/json.rs b/src/libsyntax/json.rs index 6564046ffe6..e739c6d04e1 100644 --- a/src/libsyntax/json.rs +++ b/src/libsyntax/json.rs @@ -22,7 +22,7 @@ use codemap::{CodeMap, FilePathMapping}; use syntax_pos::{self, MacroBacktrace, Span, SpanLabel, MultiSpan}; use errors::registry::Registry; -use errors::{DiagnosticBuilder, SubDiagnostic, RenderSpan, CodeSuggestion, CodeMapper}; +use errors::{DiagnosticBuilder, SubDiagnostic, CodeSuggestion, CodeMapper}; use errors::DiagnosticId; use errors::emitter::Emitter; @@ -188,7 +188,7 @@ impl Diagnostic { code: None, level: db.level.to_str(), spans: db.render_span.as_ref() - .map(|sp| DiagnosticSpan::from_render_span(sp, je)) + .map(|sp| DiagnosticSpan::from_multispan(sp, je)) .unwrap_or_else(|| DiagnosticSpan::from_multispan(&db.span, je)), children: vec![], rendered: None, @@ -300,16 +300,6 @@ impl DiagnosticSpan { }) .collect() } - - fn from_render_span(rsp: &RenderSpan, je: &JsonEmitter) -> Vec<DiagnosticSpan> { - match *rsp { - RenderSpan::FullSpan(ref msp) => - DiagnosticSpan::from_multispan(msp, je), - // regular diagnostics don't produce this anymore - // FIXME(oli_obk): remove it entirely - RenderSpan::Suggestion(_) => unreachable!(), - } - } } impl DiagnosticSpanLine { |
