-
Notifications
You must be signed in to change notification settings - Fork 13k
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
Make fatal DiagnosticBuilder yield !
#94789
Conversation
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.
Also curious if we should prevent Fatal
level errors from being created with a regular DiagnosticBuilder<ErrorGuaranteed>
. Because in that case, they really should just be Error
level errors.
@@ -21,7 +21,7 @@ impl<'tcx> StructuredDiagnostic<'tcx> for MissingCastForVariadicArg<'tcx> { | |||
} | |||
|
|||
fn diagnostic_common(&self) -> DiagnosticBuilder<'tcx, ErrorGuaranteed> { | |||
let mut err = self.sess.struct_span_fatal_with_code( | |||
let mut err = self.sess.struct_span_err_with_code( |
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 don't think this was intended to be fatal.
@@ -7,6 +7,7 @@ | |||
#![feature(backtrace)] | |||
#![feature(if_let_guard)] | |||
#![feature(let_else)] | |||
#![feature(never_type)] |
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 don't know if it's worthwhile introducing more cases of never_type
since T-lang has discussed cutting back some of the specialness of the type.
f2f858e
to
26b2d45
Compare
☔ The latest upstream changes (presumably #95056) made this pull request unmergeable. Please resolve the merge conflicts. |
This comment was marked as off-topic.
This comment was marked as off-topic.
This comment was marked as off-topic.
This comment was marked as off-topic.
88fc35b
to
d1babd7
Compare
@bors r+ |
📌 Commit d1babd779127abdc3fa878c90e6de488dd3b8414 has been approved by |
⌛ Testing commit d1babd779127abdc3fa878c90e6de488dd3b8414 with merge 3df6b768eccf7b891a9e7f3abc974dd4b9712481... |
💔 Test failed - checks-actions |
This comment has been minimized.
This comment has been minimized.
d1babd7
to
928388b
Compare
@bors r=eddyb |
📌 Commit 928388b has been approved by |
☀️ Test successful - checks-actions |
Finished benchmarking commit (0e4524e): comparison url. Summary: This benchmark run did not return any relevant results. 10 results were found to be statistically significant but too small to be relevant. If you disagree with this performance assessment, please file an issue in rust-lang/rustc-perf. @rustbot label: -perf-regression |
Fatal errors should really be fatal, so emitting them should cause us to exit at the same time.
Fine with just throwing away these changes if they're not worthwhile. Also, maybe we want to use an uninhabited enum instead of
!
.r? @eddyb who has been working on
DiagnosticBuilder
stuff, feel free to reassign.