-
Notifications
You must be signed in to change notification settings - Fork 1.9k
Open
Labels
A-lintArea: New lintsArea: New lintsE-mediumCall for participation: Medium difficulty level problem and requires some initial experience.Call for participation: Medium difficulty level problem and requires some initial experience.L-styleLint: Belongs in the style lint groupLint: Belongs in the style lint groupT-ASTType: Requires working with the ASTType: Requires working with the AST
Description
I would like to have a lint like the items_after_statements lint,but which only triggers if an item defined inside an expression block is used before it's defined.
For example,it would trigger with this code:
fn hello() {
println!("First statement");
let hello: Bar = (0..10).collect();
type Bar = Vec<u32>;
}But it would not trigger with this code:
fn hello() {
println!("First statement");
type Bar = Vec<u32>;
let hello: Bar = (0..10).collect();
}SabrinaJewson
Metadata
Metadata
Assignees
Labels
A-lintArea: New lintsArea: New lintsE-mediumCall for participation: Medium difficulty level problem and requires some initial experience.Call for participation: Medium difficulty level problem and requires some initial experience.L-styleLint: Belongs in the style lint groupLint: Belongs in the style lint groupT-ASTType: Requires working with the ASTType: Requires working with the AST