Rollup merge of #111606 - jyn514:nightly-diagnostics, r=lcnr
very minor cleanups
- add `must_use` to `early_error_no_abort`
this was already being used at its only callsite, but this ensures that new code remembers to use it if it's called in the future. found this while investigating https://github.com/rust-lang/rust/issues/110090.
- remove outdated and incorrect comment in `builder.rs`. `doc_rust_lang_org_channel` doesn't exist in rustdoc, it gets it from an env var instead: b275d2c30b/src/librustdoc/clean/utils.rs (L569-L573)
This commit is contained in:
commit
fa11c9e8ca
@ -1250,7 +1250,8 @@ pub fn install_ice_hook(bug_report_url: &'static str, extra_info: fn(&Handler))
|
|||||||
#[cfg(windows)]
|
#[cfg(windows)]
|
||||||
if let Some(msg) = info.payload().downcast_ref::<String>() {
|
if let Some(msg) = info.payload().downcast_ref::<String>() {
|
||||||
if msg.starts_with("failed printing to stdout: ") && msg.ends_with("(os error 232)") {
|
if msg.starts_with("failed printing to stdout: ") && msg.ends_with("(os error 232)") {
|
||||||
early_error_no_abort(ErrorOutputType::default(), msg.as_str());
|
// the error code is already going to be reported when the panic unwinds up the stack
|
||||||
|
let _ = early_error_no_abort(ErrorOutputType::default(), msg.as_str());
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
@ -1732,6 +1732,7 @@ fn early_error_handler(output: config::ErrorOutputType) -> rustc_errors::Handler
|
|||||||
|
|
||||||
#[allow(rustc::untranslatable_diagnostic)]
|
#[allow(rustc::untranslatable_diagnostic)]
|
||||||
#[allow(rustc::diagnostic_outside_of_impl)]
|
#[allow(rustc::diagnostic_outside_of_impl)]
|
||||||
|
#[must_use = "ErrorGuaranteed must be returned from `run_compiler` in order to exit with a non-zero status code"]
|
||||||
pub fn early_error_no_abort(
|
pub fn early_error_no_abort(
|
||||||
output: config::ErrorOutputType,
|
output: config::ErrorOutputType,
|
||||||
msg: impl Into<DiagnosticMessage>,
|
msg: impl Into<DiagnosticMessage>,
|
||||||
|
@ -942,7 +942,6 @@ impl<'a> Builder<'a> {
|
|||||||
self.run_step_descriptions(&Builder::get_step_descriptions(Kind::Doc), paths);
|
self.run_step_descriptions(&Builder::get_step_descriptions(Kind::Doc), paths);
|
||||||
}
|
}
|
||||||
|
|
||||||
/// NOTE: keep this in sync with `rustdoc::clean::utils::doc_rust_lang_org_channel`, or tests will fail on beta/stable.
|
|
||||||
pub fn doc_rust_lang_org_channel(&self) -> String {
|
pub fn doc_rust_lang_org_channel(&self) -> String {
|
||||||
let channel = match &*self.config.channel {
|
let channel = match &*self.config.channel {
|
||||||
"stable" => &self.version,
|
"stable" => &self.version,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user