rust-lang / rust-lang/reference

Guidelines for referring to rustc lints

Open
#2,027 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Authoring guide Meta
Dominant language
Rust
Stars
1.6k
Forks
607
PR merge metrics
PR metrics pending

Description

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.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reading the authoring guide and the existing references to rustc lints, including unsafe_op_in_unsafe_fn, ffi_unwind_calls, unused_variables, unused_must_use, unfulfilled_lint_expectations, and overflowing_literals. Done means documenting consistent guidance for when and how to refer to lint names, including relevant #[deprecated] and attribute-rework cases.

Written by the indexing model from the issue text.

Assessment

Tech stack
rust
Domain
documentation
Issue type
Documentation
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
38/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.