Skip to content

Commit

Permalink
Rollup merge of #124414 - lqd:subdiagnostics, r=davidtwco
Browse files Browse the repository at this point in the history
remove extraneous note on `UnableToRunDsymutil` diagnostic

If I understand [this FIXME](https://github.com/rust-lang/rust/blob/1367827eac3d813a261a4c444037af9736996daa/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
  • Loading branch information
matthiaskrgr authored May 2, 2024
2 parents 3c9d4af + 868cbee commit 6528061
Showing 0 changed files with 0 additions and 0 deletions.

0 comments on commit 6528061

Please sign in to comment.