Enforce import / type code styles throughout the compiler. #59952
Labels
A-lints
Area: Lints (warnings about flaws in source code) such as unused_mut.
T-compiler
Relevant to the compiler team, which will review and decide on the PR/issue.
We've had a few large-scale cleanup PRs before, but it doesn't always stick.
This is a quick example of what I'm referring to (as the agreed-upon style):
TyCtxt
andTy
are referred to unqualified (withoutty::
) and passed by value.(Note that types can be behind
&
due to a trait, but that should be the only exception to the rule)Currently both
&TyCtxt
and&Ty<'tcx>
show up in the codebase (although in small quantities), but I only accidentally noticed and I won't be replacing them any time soon (someone else can, if they want to, but I'm more interested in how we keep this from happening - maybe withclippy
?).cc @rust-lang/compiler
The text was updated successfully, but these errors were encountered: