From 47c7e430d35fc5b49b36d2fb5b5a75497059b05b Mon Sep 17 00:00:00 2001 From: Oliver Schneider Date: Thu, 16 Nov 2017 16:36:49 +0100 Subject: Remove left over dead code from suggestion diagnostic refactoring --- src/libsyntax/json.rs | 14 ++------------ 1 file changed, 2 insertions(+), 12 deletions(-) (limited to 'src/libsyntax') 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 { - 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 { -- cgit 1.4.1-3-g733a5