librustc: Add bug!(), bug_span!() macros as unified entry points for internal compiler errors#32562
Merged
bors merged 19 commits intorust-lang:masterfrom Apr 2, 2016
Merged
librustc: Add bug!(), bug_span!() macros as unified entry points for internal compiler errors#32562bors merged 19 commits intorust-lang:masterfrom
bors merged 19 commits intorust-lang:masterfrom
Conversation
Contributor
|
Seems good to me! I like that you get the file/line-number for free. r=me. |
692af22 to
f87aaa0
Compare
src/librustc_metadata/loader.rs
Outdated
Contributor
There was a problem hiding this comment.
Nit: This could become self.find_library_crate().unwrap_or_else(|| self.report_load_errs()).
a6234f0 to
4379c7c
Compare
Contributor
|
@bors r+ |
Collaborator
|
📌 Commit 4379c7c has been approved by |
Collaborator
|
☔ The latest upstream changes (presumably #32628) made this pull request unmergeable. Please resolve the merge conflicts. |
7aa9b6e to
98e5c22
Compare
Collaborator
|
☔ The latest upstream changes (presumably #31938) made this pull request unmergeable. Please resolve the merge conflicts. |
... as single "internal compiler error" entry point. The macros pass `file!()`, `line!()` and `format_args!(...)` on to a cold, never-inlined function, ultimately calling `bug()` or `span_bug()` on the `Handler` from `session::diagnostic()` via the tcx in tls or, failing that, panicking directly.
Contributor
|
@bors r=nikomatsakis |
Collaborator
|
📌 Commit 33cc0ed has been approved by |
Collaborator
bors
added a commit
that referenced
this pull request
Apr 2, 2016
librustc: Add bug!(), bug_span!() macros as unified entry points for internal compiler errors
The macros pass `file!()`, `line!()` and `format_args!(...)` on to a cold, never-inlined function, ultimately calling `session::{span_,}bug_fmt` via the tcx in tls or, failing that, panicking directly.
cc @eddyb
r? @nikomatsakis
Collaborator
This was referenced Apr 2, 2016
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The macros pass
file!(),line!()andformat_args!(...)on to a cold, never-inlined function, ultimately callingsession::{span_,}bug_fmtvia the tcx in tls or, failing that, panicking directly.cc @eddyb
r? @nikomatsakis