-
-
Notifications
You must be signed in to change notification settings - Fork 14.9k
#[<cfg_trace>] and #[<cfg_attr_trace>] showing up as suggestions #150566
Copy link
Copy link
Closed
Labels
A-attributesArea: Attributes (`#[…]`, `#![…]`)Area: Attributes (`#[…]`, `#![…]`)A-cfgArea: `cfg` conditional compilationArea: `cfg` conditional compilationA-diagnosticsArea: Messages for errors, warnings, and lintsArea: Messages for errors, warnings, and lintsD-invalid-suggestionDiagnostics: A structured suggestion resulting in incorrect code.Diagnostics: A structured suggestion resulting in incorrect code.T-compilerRelevant to the compiler team, which will review and decide on the PR/issue.Relevant to the compiler team, which will review and decide on the PR/issue.
Metadata
Metadata
Assignees
Labels
A-attributesArea: Attributes (`#[…]`, `#![…]`)Area: Attributes (`#[…]`, `#![…]`)A-cfgArea: `cfg` conditional compilationArea: `cfg` conditional compilationA-diagnosticsArea: Messages for errors, warnings, and lintsArea: Messages for errors, warnings, and lintsD-invalid-suggestionDiagnostics: A structured suggestion resulting in incorrect code.Diagnostics: A structured suggestion resulting in incorrect code.T-compilerRelevant to the compiler team, which will review and decide on the PR/issue.Relevant to the compiler team, which will review and decide on the PR/issue.
Type
Fields
Give feedbackNo fields configured for issues without a type.
Code
Current output
Desired output
Rationale and extra context
this is a diagnostic regression
Other cases
Rust Version
Anything else?
#[cfg_trace]and#[cfg_attr_trace]are really compiler internals, and I think we should maybe change their names to reflect this? i.e. make it#[rustc_cfg_trace]and#[rustc_cfg_attr_trace], this would also lead to better error messages in general if someone tried to use themother attributes that are added during codegen are marked like this, see for example
#[rustc_test_marker]