mirror of
https://github.com/rust-lang/rust-clippy
synced 2024-12-05 02:50:32 +00:00
45 lines
967 B
Rust
45 lines
967 B
Rust
// run-rustfix
|
|
#![feature(stmt_expr_attributes)]
|
|
#![deny(clippy::unneeded_wildcard_pattern)]
|
|
|
|
fn main() {
|
|
let t = (0, 1, 2, 3);
|
|
|
|
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 {};
|
|
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 {};
|
|
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 {};
|
|
if let S(0, ..) = s {};
|
|
if let S(.., 0) = s {};
|
|
|
|
#[rustfmt::skip]
|
|
{
|
|
if let S(0, ..,) = s {};
|
|
}
|
|
}
|