-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Closed
Labels
C-bugCategory: Clippy is not doing the correct thingCategory: Clippy is not doing the correct thingI-false-positiveIssue: The lint was triggered on code it shouldn't haveIssue: The lint was triggered on code it shouldn't have
Description
Lint name: shadow_unrelated
I tried this code:
#[warn(clippy::shadow_unrelated)]
fn foo() -> Option<i32> {
let a = 1_i32;
let a = Some(1).map(|_| a)?;
Some(a)
}
I expected to see this happen: no lint
Instead, this happened: shadow_unrelated lint
I needed a closure and a question mark to reproduce this. 🤷
Metadata
Metadata
Assignees
Labels
C-bugCategory: Clippy is not doing the correct thingCategory: Clippy is not doing the correct thingI-false-positiveIssue: The lint was triggered on code it shouldn't haveIssue: The lint was triggered on code it shouldn't have