You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Manishearth opened this issue
Aug 1, 2018
· 1 comment
Labels
A-lintArea: New lintsE-mediumCall for participation: Medium difficulty level problem and requires some initial experience.L-styleLint: Belongs in the style lint group
Rust supports putting impls pretty much anywhere .
Putting both impls and structs inside a scope is pretty common, but it's less common to put just an impl inside a scope; it may mislead you into thinking the impl itself is scoped.
We should lint on cases where there's an impl within a block, where that impl is not accompanied by the corresponding struct.
Implementation wise the most efficient way to do this is likely to keep track of blocks and find impls within blocks, and then search the block contents for a type definition.
The text was updated successfully, but these errors were encountered:
Manishearth
added
E-medium
Call for participation: Medium difficulty level problem and requires some initial experience.
A-lint
Area: New lints
L-style
Lint: Belongs in the style lint group
labels
Aug 1, 2018
A-lintArea: New lintsE-mediumCall for participation: Medium difficulty level problem and requires some initial experience.L-styleLint: Belongs in the style lint group
https://twitter.com/iximeow/status/1024681349288845318
Rust supports putting
impl
s pretty much anywhere .Putting both impls and structs inside a scope is pretty common, but it's less common to put just an impl inside a scope; it may mislead you into thinking the impl itself is scoped.
We should lint on cases where there's an impl within a block, where that impl is not accompanied by the corresponding struct.
Implementation wise the most efficient way to do this is likely to keep track of blocks and find impls within blocks, and then search the block contents for a type definition.
The text was updated successfully, but these errors were encountered: