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]| {
54 Some(x) if x == 1 => {},
58 match [None, Some(1)] {
59 [Some(x), None] | [None, Some(x)] => {},
62 if let Some(x) = Some(1) {
69 #[allow(clippy::shadow_unrelated)]
75 fn question_mark() -> Option<()> {
77 // `?` expands with a `val` binding
82 pub async fn foo1(_a: i32) {}
84 pub async fn foo2(_a: i32, _b: i64) {