Rollup merge of #124414 - lqd:subdiagnostics, r=davidtwco

remove extraneous note on `UnableToRunDsymutil` diagnostic

If I understand [this FIXME](1367827eac/compiler/rustc_macros/src/diagnostics/diagnostic.rs (L205)) correctly, it seems we don't yet validate subdiagnostics, so `#[note]` and co in the `#[derive(Diagnostic]` item could be out-of-sync with the fluent message, without causing compile errors.

It was the case for `rustc_codegen_ssa::errors::UnableToRunDsymutil`, causing the ICE in #124392.

I've grepped and scripted my way through most of our diagnostics structs and fluent bundles and the above was the only such extraneous `#[note]`/`#[note(name)]`/`#[help]`/`#[warning]` I could find, so hopefully there aren't many others like it.

I haven't checked if the opposite can happen, a `.note = ` in a fluent message that is lacking a corresponding `#[note]` on the struct and not causing an error, but maybe it's possible?

r? ``@davidtwco``
fixes #124392
This commit is contained in:
Matthias Krüger 2024-05-02 19:42:48 +02:00 committed by GitHub
commit e9e2ebb051
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -431,7 +431,6 @@ pub struct ProcessingDymutilFailed {
#[derive(Diagnostic)]
#[diag(codegen_ssa_unable_to_run_dsymutil)]
#[note]
pub struct UnableToRunDsymutil {
pub error: Error,
}