-
Notifications
You must be signed in to change notification settings - Fork 13.6k
Open
Labels
A-diagnosticsArea: Messages for errors, warnings, and lintsArea: Messages for errors, warnings, and lintsC-enhancementCategory: An issue proposing an enhancement or a PR with one.Category: An issue proposing an enhancement or a PR with one.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.
Description
This code
struct r#struct<r#fn>;
fn main() {}
Produces incorrect help message:
Compiling playground v0.0.1 (/playground)
warning: type `struct` should have an upper camel case name
--> src/main.rs:1:8
|
1 | struct r#struct<r#fn>;
| ^^^^^^^^ help: convert the identifier to upper camel case: `Struct`
|
= note: `#[warn(non_camel_case_types)]` on by default
warning: type parameter `fn` should have an upper camel case name
--> src/main.rs:1:17
|
1 | struct r#struct<r#fn>;
| ^^^^ help: convert the identifier to upper camel case: `Fn`
error[E0392]: parameter `fn` is never used
--> src/main.rs:1:17
|
1 | struct r#struct<r#fn>;
| ^^^^ unused parameter
|
= help: consider removing `fn`, referring to it in a field, or using a marker such as `std::marker::PhantomData`
error: aborting due to previous error
For more information about this error, try `rustc --explain E0392`.
error: could not compile `playground`.
To learn more, run the command again with --verbose.
Metadata
Metadata
Assignees
Labels
A-diagnosticsArea: Messages for errors, warnings, and lintsArea: Messages for errors, warnings, and lintsC-enhancementCategory: An issue proposing an enhancement or a PR with one.Category: An issue proposing an enhancement or a PR with one.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.