Skip to content

derive(Diagnostic): #[note] etc also work on bool fields - #2955

Open
RalfJung wants to merge 1 commit into
rust-lang:mainfrom
RalfJung:derive-diagnostic
Open

derive(Diagnostic): #[note] etc also work on bool fields#2955
RalfJung wants to merge 1 commit into
rust-lang:mainfrom
RalfJung:derive-diagnostic

Conversation

@RalfJung

@RalfJung RalfJung commented Aug 6, 2026

Copy link
Copy Markdown
Member

At least it certainly looks like this works:
https://github.com/rust-lang/rust/blob/c82207c46e5cefe4ddb000232aec281c28f0f6a8/compiler/rustc_codegen_ssa/src/diagnostics.rs#L1240-L1246
and then I assume it works for all of them, not just #[note].

There are also more attributes the docs don't mention: help_once, note_once. I'm not sure what exactly those do. They were added in rust-lang/rust#124417. Cc @Xiretza @fmaese

@rustbot

rustbot commented Aug 6, 2026

Copy link
Copy Markdown
Collaborator

Thanks for the PR. If you have write access, feel free to merge this PR if it does not need reviews. You can request a review using r? rustc-dev-guide or r? <username>.

@rustbot rustbot added the S-waiting-on-review Status: this PR is waiting for a reviewer to verify its content label Aug 6, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

S-waiting-on-review Status: this PR is waiting for a reviewer to verify its content

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants