mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-30 10:45:18 +00:00
13 lines
292 B
Rust
13 lines
292 B
Rust
//@ run-rustfix
|
|
// Regression test for #81314: Unused variable lint should
|
|
// span only the identifier and not the rest of the pattern
|
|
|
|
#![deny(unused)]
|
|
|
|
fn main() {
|
|
let [_rest @ ..] = [1, 2, 3]; //~ ERROR unused variable
|
|
}
|
|
|
|
pub fn foo([_rest @ ..]: &[i32]) { //~ ERROR unused variable
|
|
}
|