diff options
| author | Jonathan Turner <jturner@mozilla.com> | 2016-05-23 12:50:34 -0400 |
|---|---|---|
| committer | Jonathan Turner <jturner@mozilla.com> | 2016-05-23 12:51:00 -0400 |
| commit | 9e5574803fcc09b855e33b7a71abb304b9cd6c54 (patch) | |
| tree | 9b60c6e80bc71f57e5d81f9dba5b9a7f2051237d /src/libsyntax/errors | |
| parent | 4c6b6c200befdef9d5882a8edf135efc20de905a (diff) | |
| download | rust-9e5574803fcc09b855e33b7a71abb304b9cd6c54.tar.gz rust-9e5574803fcc09b855e33b7a71abb304b9cd6c54.zip | |
Update error format for readability. Add spacing header<->snippet and another line between errors
Diffstat (limited to 'src/libsyntax/errors')
| -rw-r--r-- | src/libsyntax/errors/emitter.rs | 2 | ||||
| -rw-r--r-- | src/libsyntax/errors/snippet/mod.rs | 7 |
2 files changed, 8 insertions, 1 deletions
diff --git a/src/libsyntax/errors/emitter.rs b/src/libsyntax/errors/emitter.rs index 7c9985d7d23..2ba003c5eaf 100644 --- a/src/libsyntax/errors/emitter.rs +++ b/src/libsyntax/errors/emitter.rs @@ -238,7 +238,7 @@ impl EmitterWriter { self.first = false; } else { if !self.old_school { - write!(self.dst, "\n")?; + write!(self.dst, "\n\n")?; } } } diff --git a/src/libsyntax/errors/snippet/mod.rs b/src/libsyntax/errors/snippet/mod.rs index 188e676e7df..414da87b749 100644 --- a/src/libsyntax/errors/snippet/mod.rs +++ b/src/libsyntax/errors/snippet/mod.rs @@ -478,6 +478,13 @@ impl FileInfo { }], kind: RenderedLineKind::PrimaryFileName, }); + output.push(RenderedLine { + text: vec![StyledString { + text: "".to_string(), + style: Style::FileNameStyle, + }], + kind: RenderedLineKind::Annotations, + }); } None => { output.push(RenderedLine { |
