1 #![warn(clippy::shadow_same, clippy::shadow_reuse, clippy::shadow_unrelated)]
11 fn shadow_reuse() -> Option<()> {
19 let x = Some(1).map(|_| x)?;
28 fn shadow_unrelated() {
45 if let Some(x) = Some(1) {}
46 while let Some(x) = Some(1) {}
47 let _ = |[x]: [u32; 1]| {
56 Some(x) if x == 1 => {},
60 match [None, Some(1)] {
61 [Some(x), None] | [None, Some(x)] => {},
64 if let Some(x) = Some(1) {
71 #[allow(clippy::shadow_unrelated)]
77 fn question_mark() -> Option<()> {
79 // `?` expands with a `val` binding
84 pub async fn foo1(_a: i32) {}
86 pub async fn foo2(_a: i32, _b: i64) {