Skip to content

Commit f410a76

Browse files
Rollup merge of rust-lang#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 rust-lang#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: https://github.com/rust-lang/rust/blob/b275d2c30b6e88cc48747f349f7137076d450658/src/librustdoc/clean/utils.rs#L569-L573
2 parents 477cc24 + 0426562 commit f410a76

File tree

3 files changed

+3
-2
lines changed

3 files changed

+3
-2
lines changed

compiler/rustc_driver_impl/src/lib.rs

+2-1
Original file line numberDiff line numberDiff line change
@@ -1250,7 +1250,8 @@ pub fn install_ice_hook(bug_report_url: &'static str, extra_info: fn(&Handler))
12501250
#[cfg(windows)]
12511251
if let Some(msg) = info.payload().downcast_ref::<String>() {
12521252
if msg.starts_with("failed printing to stdout: ") && msg.ends_with("(os error 232)") {
1253-
early_error_no_abort(ErrorOutputType::default(), msg.as_str());
1253+
// the error code is already going to be reported when the panic unwinds up the stack
1254+
let _ = early_error_no_abort(ErrorOutputType::default(), msg.as_str());
12541255
return;
12551256
}
12561257
};

compiler/rustc_session/src/session.rs

+1
Original file line numberDiff line numberDiff line change
@@ -1732,6 +1732,7 @@ fn early_error_handler(output: config::ErrorOutputType) -> rustc_errors::Handler
17321732

17331733
#[allow(rustc::untranslatable_diagnostic)]
17341734
#[allow(rustc::diagnostic_outside_of_impl)]
1735+
#[must_use = "ErrorGuaranteed must be returned from `run_compiler` in order to exit with a non-zero status code"]
17351736
pub fn early_error_no_abort(
17361737
output: config::ErrorOutputType,
17371738
msg: impl Into<DiagnosticMessage>,

src/bootstrap/builder.rs

-1
Original file line numberDiff line numberDiff line change
@@ -942,7 +942,6 @@ impl<'a> Builder<'a> {
942942
self.run_step_descriptions(&Builder::get_step_descriptions(Kind::Doc), paths);
943943
}
944944

945-
/// NOTE: keep this in sync with `rustdoc::clean::utils::doc_rust_lang_org_channel`, or tests will fail on beta/stable.
946945
pub fn doc_rust_lang_org_channel(&self) -> String {
947946
let channel = match &*self.config.channel {
948947
"stable" => &self.version,

0 commit comments

Comments
 (0)