Closed
Description
As mentioned in this PR #60152 all the lints implementing new
to just return Self
with empty/default values should use #[derive(Default)]
instead to achieve semantic compression.
Example of such a lint
https://github.com/rust-lang/rust/blob/master/src/librustc_lint/builtin.rs#L553
Lint is then instantiated here
https://github.com/rust-lang/rust/blob/master/src/librustc_lint/lib.rs#L135
Metadata
Metadata
Assignees
Labels
Area: Lints (warnings about flaws in source code) such as unused_mut.Category: PRs that clean code up or issues documenting cleanup.Call for participation: Easy difficulty. Experience needed to fix: Not much. Good first issue.Relevant to the compiler team, which will review and decide on the PR/issue.