]> git.lizzy.rs Git - rust.git/blob - src/test/ui/lint/issue-81314-unused-span-ident.fixed
Merge commit '0969bc6dde001e01e7e1f58c8ccd7750f8a49ae1' into sync_cg_clif-2021-03-29
[rust.git] / src / test / ui / lint / issue-81314-unused-span-ident.fixed
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
7 fn main() {
8     let [_rest @ ..] = [1, 2, 3]; //~ ERROR unused variable
9 }
10
11 pub fn foo([_rest @ ..]: &[i32]) { //~ ERROR unused variable
12 }