2023-08-24 14:32:12 -05:00
|
|
|
//@aux-build:proc_macros.rs
|
2019-09-12 01:25:05 -05:00
|
|
|
#![feature(stmt_expr_attributes)]
|
|
|
|
#![deny(clippy::unneeded_wildcard_pattern)]
|
2023-07-02 07:35:19 -05:00
|
|
|
#![allow(clippy::needless_if)]
|
|
|
|
|
|
|
|
#[macro_use]
|
|
|
|
extern crate proc_macros;
|
2019-09-12 01:25:05 -05:00
|
|
|
|
|
|
|
fn main() {
|
|
|
|
let t = (0, 1, 2, 3);
|
|
|
|
|
|
|
|
if let (0, ..) = t {};
|
|
|
|
if let (0, ..) = t {};
|
2019-09-22 02:10:39 -05:00
|
|
|
if let (.., 0) = t {};
|
|
|
|
if let (.., 0) = t {};
|
2019-09-12 01:25:05 -05:00
|
|
|
if let (0, ..) = t {};
|
|
|
|
if let (0, ..) = t {};
|
|
|
|
if let (_, 0, ..) = t {};
|
|
|
|
if let (.., 0, _) = t {};
|
|
|
|
if let (0, _, _, _) = t {};
|
|
|
|
if let (0, ..) = t {};
|
|
|
|
if let (.., 0) = t {};
|
|
|
|
|
|
|
|
#[rustfmt::skip]
|
|
|
|
{
|
|
|
|
if let (0, ..,) = t {};
|
|
|
|
}
|
|
|
|
|
|
|
|
struct S(usize, usize, usize, usize);
|
|
|
|
|
|
|
|
let s = S(0, 1, 2, 3);
|
|
|
|
|
|
|
|
if let S(0, ..) = s {};
|
|
|
|
if let S(0, ..) = s {};
|
2019-09-22 02:10:39 -05:00
|
|
|
if let S(.., 0) = s {};
|
|
|
|
if let S(.., 0) = s {};
|
2019-09-12 01:25:05 -05:00
|
|
|
if let S(0, ..) = s {};
|
|
|
|
if let S(0, ..) = s {};
|
|
|
|
if let S(_, 0, ..) = s {};
|
|
|
|
if let S(.., 0, _) = s {};
|
|
|
|
if let S(0, _, _, _) = s {};
|
|
|
|
if let S(0, ..) = s {};
|
|
|
|
if let S(.., 0) = s {};
|
|
|
|
|
|
|
|
#[rustfmt::skip]
|
|
|
|
{
|
|
|
|
if let S(0, ..,) = s {};
|
|
|
|
}
|
2023-07-02 07:35:19 -05:00
|
|
|
external! {
|
|
|
|
let t = (0, 1, 2, 3);
|
|
|
|
if let (0, _, ..) = t {};
|
|
|
|
}
|
2019-09-12 01:25:05 -05:00
|
|
|
}
|