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:
parent
9d022f2993
commit
1067850e6a
5 changed files with 92 additions and 113 deletions
|
@ -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
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue