summaryrefslogtreecommitdiffstats
path: root/src/test/ui/lint/lint-uppercase-variables.stderr
blob: 71b24a835bcd9c18f41139646eaa8b8f9a5450fe (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
warning[E0170]: pattern binding `Foo` is named the same as one of the variants of the type `Foo`
  --> $DIR/lint-uppercase-variables.rs:22:9
   |
LL |         Foo => {}
   |         ^^^ help: to match on the variant, qualify the path: `Foo::Foo`
   |
   = note: `#[warn(bindings_with_variant_name)]` on by default

warning[E0170]: pattern binding `Foo` is named the same as one of the variants of the type `Foo`
  --> $DIR/lint-uppercase-variables.rs:28:9
   |
LL |     let Foo = foo::Foo::Foo;
   |         ^^^ help: to match on the variant, qualify the path: `Foo::Foo`

warning[E0170]: pattern binding `Foo` is named the same as one of the variants of the type `Foo`
  --> $DIR/lint-uppercase-variables.rs:33:17
   |
LL |     fn in_param(Foo: foo::Foo) {}
   |                 ^^^ help: to match on the variant, qualify the path: `Foo::Foo`

warning: unused variable: `Foo`
  --> $DIR/lint-uppercase-variables.rs:22:9
   |
LL |         Foo => {}
   |         ^^^ help: if this is intentional, prefix it with an underscore: `_Foo`
   |
note: the lint level is defined here
  --> $DIR/lint-uppercase-variables.rs:1:9
   |
LL | #![warn(unused)]
   |         ^^^^^^
   = note: `#[warn(unused_variables)]` implied by `#[warn(unused)]`

warning: unused variable: `Foo`
  --> $DIR/lint-uppercase-variables.rs:28:9
   |
LL |     let Foo = foo::Foo::Foo;
   |         ^^^ help: if this is intentional, prefix it with an underscore: `_Foo`

warning: unused variable: `Foo`
  --> $DIR/lint-uppercase-variables.rs:33:17
   |
LL |     fn in_param(Foo: foo::Foo) {}
   |                 ^^^ help: if this is intentional, prefix it with an underscore: `_Foo`

error: structure field `X` should have a snake case name
  --> $DIR/lint-uppercase-variables.rs:10:5
   |
LL |     X: usize
   |     ^ help: convert the identifier to snake case (notice the capitalization): `x`
   |
note: the lint level is defined here
  --> $DIR/lint-uppercase-variables.rs:3:9
   |
LL | #![deny(non_snake_case)]
   |         ^^^^^^^^^^^^^^

error: variable `Xx` should have a snake case name
  --> $DIR/lint-uppercase-variables.rs:13:9
   |
LL | fn test(Xx: usize) {
   |         ^^ help: convert the identifier to snake case (notice the capitalization): `xx`

error: variable `Test` should have a snake case name
  --> $DIR/lint-uppercase-variables.rs:18:9
   |
LL |     let Test: usize = 0;
   |         ^^^^ help: convert the identifier to snake case: `test`

error: variable `Foo` should have a snake case name
  --> $DIR/lint-uppercase-variables.rs:22:9
   |
LL |         Foo => {}
   |         ^^^ help: convert the identifier to snake case (notice the capitalization): `foo`

error: variable `Foo` should have a snake case name
  --> $DIR/lint-uppercase-variables.rs:28:9
   |
LL |     let Foo = foo::Foo::Foo;
   |         ^^^ help: convert the identifier to snake case (notice the capitalization): `foo`

error: variable `Foo` should have a snake case name
  --> $DIR/lint-uppercase-variables.rs:33:17
   |
LL |     fn in_param(Foo: foo::Foo) {}
   |                 ^^^ help: convert the identifier to snake case (notice the capitalization): `foo`

error: aborting due to 6 previous errors; 6 warnings emitted

For more information about this error, try `rustc --explain E0170`.