Skip to content

Normalize use of backticks in syntax for user-facing compiler messages #60532

Closed
@alexreg

Description

@alexreg

This is more pedantry from me, and admittedly not very high-priority, but I have noticed that there are discrepancies between compiler error/informational messages where syntax is included in them – some use backticks around code syntax, some don't. Furthermore, some start with lower case (the vast majority), while some don't.

For example:

"attribute must be of the form `#[derive(Trait1, Trait2, ...)]`"

vs.

"type does not implement `fmt::Debug`; consider adding #[derive(Debug)] \

(an internal inconsistency in this second case too!)

It would be nice to normalise this according some guidelines. I'd imagine the guidelines should agree with rustdoc as much as possible, though starting all messages with lower case may be desirable, since it is "command-line fashion".

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-diagnosticsArea: Messages for errors, warnings, and lintsC-enhancementCategory: An issue proposing an enhancement or a PR with one.E-easyCall for participation: Easy difficulty. Experience needed to fix: Not much. Good first issue.T-compilerRelevant to the compiler team, which will review and decide on the PR/issue.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions