Skip to content

Guidelines for referring to rustc lints #2027

Description

@ehuss

I think the authoring guide should have some guidelines on referring to rustc lints.

Generally we prefer to avoid referring to them, but in several cases it is a disservice to not mention them. It would be helpful to have guidance on how to balance those kinds of references.

Some examples of lints that are currently referred to:

  • unsafe_op_in_unsafe_fn
  • ffi_unwind_calls
  • unused_variables
  • unused_must_use
  • unfulfilled_lint_expectations
  • overflowing_literals

There's other cases where it currently doesn't refer to the specific lint, for example the #[deprecated] attribute, which arguably would benefit for a link to it.

As part of the attribute rework, we have a bunch of notes about rustc linting about certain things (like unused attributes, or future-incompatible warnings), but they don't refer to the lint by name.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Authoring guideIssues for the authoring guide and style guidelinesMetaNon-content issues (procedure, tooling, website, etc.)

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions