-
Notifications
You must be signed in to change notification settings - Fork 12.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Simplify librustc_errors #34789
Simplify librustc_errors #34789
Conversation
} | ||
impl Emitter for EmitterWriter { | ||
fn emit(&mut self, db: &DiagnosticBuilder) { | ||
let old_school = match self.format_mode { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I was massively confused about "school" here vs "skool", please udpate.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
To be clear, I think "skool" is the correct spelling
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
-_-
Looks good to me! I didn't look too closely at the code changes as it looked like it was mostly just stuff moving around, but I like the simplifying refactors here quite a bit! r? @Manishearth -- if this plays into a syntax breaking change I'll defer to you, otherwise this looks ready to r+ to me |
Not really a libsyntax breaking change, but might affect syntex -- cc @dtolnay |
c4c894e
to
506cd8d
Compare
4949022
to
a9dfac8
Compare
Looks like we got the okay from @Manishearth and @dtolnay. @bors r=alexcrichton |
📌 Commit c7158a1 has been approved by |
⌛ Testing commit c7158a1 with merge c7e060a... |
💔 Test failed - auto-win-msvc-32-opt |
Simplify librustc_errors This is part 2 of the error crate refactor, starting with #34403. In this refactor, I focused on slimming down the error crate to fewer moving parts. As such, I've removed quite a few parts and replaced the with simpler, straight-line code. Specifically, this PR: * Removes BasicEmitter * Remove emit from emitter, leaving emit_struct * Renames emit_struct to emit * Removes CoreEmitter and focuses on a single Emitter * Implements the latest changes to error format RFC (#1644) * Removes (now-unused) code in emitter.rs and snippet.rs * Moves more tests to the UI tester, removing some duplicate tests in the process There is probably more that could be done with some additional refactoring, but this felt like it was getting to a good state. r? @alexcrichton cc: @Manishearth (as there may be breaking changes in stuff I removed/changed)
Fix issue #41652 Fix issue #41652. Don't print anything in `render_source_line()` if no source code is given. (cc @jonathandturner #34789)
This is part 2 of the error crate refactor, starting with #34403.
In this refactor, I focused on slimming down the error crate to fewer moving parts. As such, I've removed quite a few parts and replaced the with simpler, straight-line code. Specifically, this PR:
There is probably more that could be done with some additional refactoring, but this felt like it was getting to a good state.
r? @alexcrichton cc: @Manishearth (as there may be breaking changes in stuff I removed/changed)