2023-07-27 08:23:04 -05:00
|
|
|
//@aux-build:proc_macros.rs
|
2023-06-23 06:02:39 -05:00
|
|
|
#![allow(irrefutable_let_patterns, unused)]
|
2023-06-27 06:09:28 -05:00
|
|
|
#![warn(clippy::redundant_at_rest_pattern)]
|
2023-06-23 06:02:39 -05:00
|
|
|
|
|
|
|
#[macro_use]
|
|
|
|
extern crate proc_macros;
|
|
|
|
|
|
|
|
fn main() {
|
|
|
|
if let [a @ ..] = [()] {}
|
|
|
|
if let [ref a @ ..] = [()] {}
|
|
|
|
if let [mut a @ ..] = [()] {}
|
|
|
|
if let [ref mut a @ ..] = [()] {}
|
|
|
|
let v = vec![()];
|
|
|
|
if let [a @ ..] = &*v {}
|
|
|
|
let s = &[()];
|
|
|
|
if let [a @ ..] = s {}
|
|
|
|
// Don't lint
|
|
|
|
if let [..] = &*v {}
|
|
|
|
if let [a] = &*v {}
|
|
|
|
if let [()] = &*v {}
|
|
|
|
if let [first, rest @ ..] = &*v {}
|
|
|
|
if let a = [()] {}
|
|
|
|
external! {
|
|
|
|
if let [a @ ..] = [()] {}
|
|
|
|
}
|
|
|
|
}
|