refactor the Emitter trait

There is now a CoreEmitter that everything desugars to, but without
losing any information. Also remove RenderSpan::FileLine. This lets the
rustc_driver tests build.
This commit is contained in:
Niko Matsakis 2016-04-20 20:00:25 -04:00
parent 9d022f2993
commit 1067850e6a
5 changed files with 92 additions and 113 deletions

View file

@ -294,7 +294,6 @@ impl DiagnosticSpan {
fn from_render_span(rsp: &RenderSpan, je: &JsonEmitter) -> Vec<DiagnosticSpan> {
match *rsp {
RenderSpan::FileLine(ref msp) |
RenderSpan::FullSpan(ref msp) =>
DiagnosticSpan::from_multispan(msp, je),
RenderSpan::Suggestion(ref suggestion) =>
@ -356,7 +355,6 @@ impl DiagnosticCode {
impl JsonEmitter {
fn render(&self, render_span: &RenderSpan) -> Option<String> {
match *render_span {
RenderSpan::FileLine(_) |
RenderSpan::FullSpan(_) => {
None
}