]> git.lizzy.rs Git - rust.git/blob - src/test/ui/lint/lint-unused-mut-variables.lexical.stderr
Move parse-fail tests to UI
[rust.git] / src / test / ui / lint / lint-unused-mut-variables.lexical.stderr
1 error: variable does not need to be mutable
2   --> $DIR/lint-unused-mut-variables.rs:59:14
3    |
4 LL |     let x = |mut y: isize| 10; //[lexical]~ ERROR: variable does not need to be mutable
5    |              ----^
6    |              |
7    |              help: remove this `mut`
8    |
9 note: lint level defined here
10   --> $DIR/lint-unused-mut-variables.rs:19:9
11    |
12 LL | #![deny(unused_mut)]
13    |         ^^^^^^^^^^
14
15 error: variable does not need to be mutable
16   --> $DIR/lint-unused-mut-variables.rs:24:9
17    |
18 LL |     let mut a = 3; //[lexical]~ ERROR: variable does not need to be mutable
19    |         ----^
20    |         |
21    |         help: remove this `mut`
22
23 error: variable does not need to be mutable
24   --> $DIR/lint-unused-mut-variables.rs:26:9
25    |
26 LL |     let mut a = 2; //[lexical]~ ERROR: variable does not need to be mutable
27    |         ----^
28    |         |
29    |         help: remove this `mut`
30
31 error: variable does not need to be mutable
32   --> $DIR/lint-unused-mut-variables.rs:28:9
33    |
34 LL |     let mut b = 3; //[lexical]~ ERROR: variable does not need to be mutable
35    |         ----^
36    |         |
37    |         help: remove this `mut`
38
39 error: variable does not need to be mutable
40   --> $DIR/lint-unused-mut-variables.rs:30:9
41    |
42 LL |     let mut a = vec![3]; //[lexical]~ ERROR: variable does not need to be mutable
43    |         ----^
44    |         |
45    |         help: remove this `mut`
46
47 error: variable does not need to be mutable
48   --> $DIR/lint-unused-mut-variables.rs:32:10
49    |
50 LL |     let (mut a, b) = (1, 2); //[lexical]~ ERROR: variable does not need to be mutable
51    |          ----^
52    |          |
53    |          help: remove this `mut`
54
55 error: variable does not need to be mutable
56   --> $DIR/lint-unused-mut-variables.rs:34:9
57    |
58 LL |     let mut a; //[lexical]~ ERROR: variable does not need to be mutable
59    |         ----^
60    |         |
61    |         help: remove this `mut`
62
63 error: variable does not need to be mutable
64   --> $DIR/lint-unused-mut-variables.rs:38:9
65    |
66 LL |     let mut b; //[lexical]~ ERROR: variable does not need to be mutable
67    |         ----^
68    |         |
69    |         help: remove this `mut`
70
71 error: variable does not need to be mutable
72   --> $DIR/lint-unused-mut-variables.rs:47:9
73    |
74 LL |         mut x => {} //[lexical]~ ERROR: variable does not need to be mutable
75    |         ----^
76    |         |
77    |         help: remove this `mut`
78
79 error: variable does not need to be mutable
80   --> $DIR/lint-unused-mut-variables.rs:51:8
81    |
82 LL |       (mut x, 1) | //[lexical]~ ERROR: variable does not need to be mutable
83    |        ----^
84    |        |
85    |        help: remove this `mut`
86
87 error: variable does not need to be mutable
88   --> $DIR/lint-unused-mut-variables.rs:64:9
89    |
90 LL |     let mut a = &mut 5; //[lexical]~ ERROR: variable does not need to be mutable
91    |         ----^
92    |         |
93    |         help: remove this `mut`
94
95 error: variable does not need to be mutable
96   --> $DIR/lint-unused-mut-variables.rs:69:9
97    |
98 LL |     let mut b = (&mut a,); //[lexical]~ ERROR: variable does not need to be mutable
99    |         ----^
100    |         |
101    |         help: remove this `mut`
102
103 error: variable does not need to be mutable
104   --> $DIR/lint-unused-mut-variables.rs:72:9
105    |
106 LL |     let mut x = &mut 1; //[lexical]~ ERROR: variable does not need to be mutable
107    |         ----^
108    |         |
109    |         help: remove this `mut`
110
111 error: variable does not need to be mutable
112   --> $DIR/lint-unused-mut-variables.rs:84:9
113    |
114 LL |     let mut v : &mut Vec<()> = &mut vec![]; //[lexical]~ ERROR: variable does not need to be mutable
115    |         ----^
116    |         |
117    |         help: remove this `mut`
118
119 error: variable does not need to be mutable
120   --> $DIR/lint-unused-mut-variables.rs:61:13
121    |
122 LL |     fn what(mut foo: isize) {} //[lexical]~ ERROR: variable does not need to be mutable
123    |             ----^^^
124    |             |
125    |             help: remove this `mut`
126
127 error: variable does not need to be mutable
128   --> $DIR/lint-unused-mut-variables.rs:79:20
129    |
130 LL |     fn mut_ref_arg(mut arg : &mut [u8]) -> &mut [u8] {
131    |                    ----^^^
132    |                    |
133    |                    help: remove this `mut`
134
135 error: variable does not need to be mutable
136   --> $DIR/lint-unused-mut-variables.rs:143:9
137    |
138 LL |     let mut b = vec![2]; //[lexical]~ ERROR: variable does not need to be mutable
139    |         ----^
140    |         |
141    |         help: remove this `mut`
142    |
143 note: lint level defined here
144   --> $DIR/lint-unused-mut-variables.rs:139:8
145    |
146 LL | #[deny(unused_mut)]
147    |        ^^^^^^^^^^
148
149 error: aborting due to 17 previous errors
150