rust-clippy icon indicating copy to clipboard operation
rust-clippy copied to clipboard

Inconsistency about which lint pass to use (`cargo dev` and Clippy Book)

Open NullSpaceBoy opened this issue 2 years ago • 3 comments

Description

Running cargo dev new_lint with --pass=early prints the following message:

NOTE: Use a late pass unless you need something specific from
an early pass, as they lack many features and utilities

while the Clippy Book says:

In short, the LateLintPass has access to type information while the EarlyLintPass doesn't. If you don't need access to type information, use the EarlyLintPass.

The book seems to push for the use of EarlyLintPass except when type information is needed while cargo dev supports the use of LateLintPass. This inconsistency is rather confusing.

Version

rustc 1.79.0-nightly (1388d7a06 2024-03-20)
binary: rustc
commit-hash: 1388d7a069d872bcfe5e5dd97ef61fa0a586fac0
commit-date: 2024-03-20
host: x86_64-pc-windows-msvc
release: 1.79.0-nightly
LLVM version: 18.1.2

Additional Labels

@rustbot label +A-documentation

NullSpaceBoy avatar Mar 30 '24 05:03 NullSpaceBoy

Error: Parsing assign command in comment failed: ...' assign ' | error: specify user to assign to at >| 'I shall mo'...

Please file an issue on GitHub at triagebot if there's a problem with this bot, or reach out on #t-infra on Zulip.

rustbot avatar Mar 30 '24 05:03 rustbot

@rustbot claim I shall modify the message printed by cargo dev new_lint to be consistent with what's written in the book.

NullSpaceBoy avatar Mar 30 '24 05:03 NullSpaceBoy

Error: Parsing assign command in comment failed: ...' assign ' | error: specify user to assign to at >| 'I shall mo'...

Please file an issue on GitHub at triagebot if there's a problem with this bot, or reach out on #t-infra on Zulip.

rustbot avatar Mar 30 '24 05:03 rustbot