`#![register_{attribute,lint}_tool]` by jyn514 · Pull Request #3808 · rust-lang/rfcs

@jyn514 @BD103

Co-authored-by: BD103 <59022059+BD103@users.noreply.github.com>

@jyn514

- mention that `rustdoc -w json` will include the attributes
- fix semver-checks spelling
- apparently adding `inline` can be a breaking change 🙄

@jyn514

@Zalathar Zalathar added the T-lang

Relevant to the language team, which will review and decide on the RFC.

label

May 6, 2025

@jyn514

petrochenkov

epage

epage

epage

bjorn3

- make cargo registration the main user interface
- specify that `no_implicit_prelude` does not affect tools

@jyn514

bjorn3

@jyn514

- all ambiguity is forbidden, not just tool<->local ambiguity. as a
  result, there is no change to precedence order.
- no special-casing for attribute macros; tools are visible in any
  context in the type namespace
- the suggested way to add a new built-in tool is "wait for an edition"

@ojeda ojeda mentioned this pull request

May 6, 2025

48 tasks

celinval

@jyn514

@BD103 BD103 mentioned this pull request

May 8, 2025

carolynzech

celinval

@jyn514

@BD103 BD103 mentioned this pull request

May 26, 2025

tmandry

@jyn514 @tmandry

…ol attribute

Co-authored-by: Tyler Mandry <tmandry@gmail.com>

@rustbot rustbot added the I-lang-nominated

Indicates that an issue has been nominated for prioritizing at the next lang team meeting.

label

Dec 10, 2025

shepmaster

jyn514

Hinata-Mikami pushed a commit to Hinata-Mikami/RefinedRust that referenced this pull request

Jan 5, 2026

intel-lab-lkp pushed a commit to intel-lab-lkp/linux that referenced this pull request

Jan 27, 2026
Register "klint" as a tool so that rustc understands that `#[klint::attr]`
is a tool attribute and `klint::lint` is a tool lint.

This makes use of the `register_tool` feature which has been implemented as
a nightly feature for long time and has an active RFC. The feature does not
change any functionality, simply make it possible for Rust to recognize
extra tools in addition to the built-in hardcoded ones (clippy & rustdoc).

Link: rust-lang/rfcs#3808
Signed-off-by: Gary Guo <gary@garyguo.net>