]>
git.proxmox.com Git - rustc.git/blob - src/test/ui/lint/lint-uppercase-variables.rs
3 #![deny(non_snake_case)]
10 X
: usize //~ ERROR structure field `X` should have a snake case name
13 fn test(Xx
: usize) { //~ ERROR variable `Xx` should have a snake case name
18 let Test
: usize = 0; //~ ERROR variable `Test` should have a snake case name
23 //~^ ERROR variable `Foo` should have a snake case name
24 //~^^ WARN `Foo` is named the same as one of the variants of the type `Foo`
25 //~^^^ WARN unused variable: `Foo`
28 let Foo
= foo
::Foo
::Foo
;
29 //~^ ERROR variable `Foo` should have a snake case name
30 //~^^ WARN `Foo` is named the same as one of the variants of the type `Foo`
31 //~^^^ WARN unused variable: `Foo`
33 fn in_param(Foo
: foo
::Foo
) {}
34 //~^ ERROR variable `Foo` should have a snake case name
35 //~^^ WARN `Foo` is named the same as one of the variants of the type `Foo`
36 //~^^^ WARN unused variable: `Foo`
40 let _
= Something { X: 0 }
;