From 98fc7320373d5b18a92df18ea155c271772596b9 Mon Sep 17 00:00:00 2001 From: Ralf Jung Date: Thu, 6 Aug 2026 14:56:34 +0200 Subject: [PATCH] derive(Diagnostic): #[note] etc also work on bool fields --- src/diagnostics/diagnostic-structs.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/diagnostics/diagnostic-structs.md b/src/diagnostics/diagnostic-structs.md index 9631ccc08..6a450909e 100644 --- a/src/diagnostics/diagnostic-structs.md +++ b/src/diagnostics/diagnostic-structs.md @@ -135,12 +135,12 @@ tcx.dcx().emit_err(FieldAlreadyDeclared { - `code = "..."` (_Optional_) - Specifies the error code. - `#[note("message")]` (_Optional_) - - _Applied to struct or struct fields of type `Span`, `Option<()>` or `()`._ + - _Applied to struct or struct fields of type `Span`, `Option<()>`, `bool`, or `()`._ - Adds a note subdiagnostic. - Value is the note's message. - If applied to a `Span` field, creates a spanned note. - `#[help("message")]` (_Optional_) - - _Applied to struct or struct fields of type `Span`, `Option<()>` or `()`._ + - _Applied to struct or struct fields of type `Span`, `Option<()>`, `bool`, or `()`._ - Adds a help subdiagnostic. - Value is the help message. - If applied to a `Span` field, creates a spanned help. @@ -149,7 +149,7 @@ tcx.dcx().emit_err(FieldAlreadyDeclared { - Adds a label subdiagnostic. - Value is the label's message. - `#[warning("message")]` (_Optional_) - - _Applied to struct or struct fields of type `Span`, `Option<()>` or `()`._ + - _Applied to struct or struct fields of type `Span`, `Option<()>`, `bool`, or `()`._ - Adds a warning subdiagnostic. - Value is the warning's message. - `#[suggestion{,_hidden,_short,_verbose}("message", code = "...", applicability = "...")]`