fork/rust

git clone https://git.julia.blue/fork/rust

borsAuto merge of #103046 - JanBeh:PR_clarify_cmp_terminology, r=workingjubilee3bcad65fbf6

master
291 B12 linesraw
1// run-rustfix
2// Regression test for #81314: Unused variable lint should
3// span only the identifier and not the rest of the pattern
4
5#![deny(unused)]
6
7fn main() {
8    let [_rest @ ..] = [1, 2, 3]; //~ ERROR unused variable
9}
10
11pub fn foo([_rest @ ..]: &[i32]) { //~ ERROR unused variable
12}