Skip to content

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

Merged
tshepang merged 1 commit into
rust-lang:mainfrom
RalfJung:derive-diagnostic
Aug 11, 2026
Merged

derive(Diagnostic): #[note] etc also work on bool fields#2955
tshepang merged 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
@tshepang
tshepang merged commit 70f9644 into rust-lang:main Aug 11, 2026
1 check passed
@rustbot rustbot removed the S-waiting-on-review Status: this PR is waiting for a reviewer to verify its content label Aug 11, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants