fork/rust
git clone https://git.julia.blue/fork/rust
3bcad65fbf6
master
1//@aux-build:proc_macros.rs 2#![feature(stmt_expr_attributes)] 3#![deny(clippy::unneeded_wildcard_pattern)] 4#![allow(clippy::needless_if)] 5 6#[macro_use] 7extern crate proc_macros; 8 9fn main() { 10 let t = (0, 1, 2, 3); 11 12 if let (0, ..) = t {}; 13 if let (0, ..) = t {}; 14 if let (.., 0) = t {}; 15 if let (.., 0) = t {}; 16 if let (0, ..) = t {}; 17 if let (0, ..) = t {}; 18 if let (_, 0, ..) = t {}; 19 if let (.., 0, _) = t {}; 20 if let (0, _, _, _) = t {}; 21 if let (0, ..) = t {}; 22 if let (.., 0) = t {}; 23 24 #[rustfmt::skip] 25 { 26 if let (0, ..,) = t {}; 27 } 28 29 struct S(usize, usize, usize, usize); 30 31 let s = S(0, 1, 2, 3); 32 33 if let S(0, ..) = s {}; 34 if let S(0, ..) = s {}; 35 if let S(.., 0) = s {}; 36 if let S(.., 0) = s {}; 37 if let S(0, ..) = s {}; 38 if let S(0, ..) = s {}; 39 if let S(_, 0, ..) = s {}; 40 if let S(.., 0, _) = s {}; 41 if let S(0, _, _, _) = s {}; 42 if let S(0, ..) = s {}; 43 if let S(.., 0) = s {}; 44 45 #[rustfmt::skip] 46 { 47 if let S(0, ..,) = s {}; 48 } 49 external! { 50 let t = (0, 1, 2, 3); 51 if let (0, _, ..) = t {}; 52 } 53}