2019-12-28 09:54:27 -06:00
|
|
|
warning: variable does not need to be mutable
|
2019-07-26 17:52:37 -05:00
|
|
|
--> $DIR/lint-unused-mut-variables.rs:9:5
|
2018-08-08 07:28:26 -05:00
|
|
|
|
|
2019-07-26 17:52:37 -05:00
|
|
|
LL | mut a: i32,
|
|
|
|
| ----^
|
|
|
|
| |
|
|
|
|
| help: remove this `mut`
|
2018-08-08 07:28:26 -05:00
|
|
|
|
|
2020-01-22 17:57:38 -06:00
|
|
|
note: the lint level is defined here
|
2019-07-26 17:52:37 -05:00
|
|
|
--> $DIR/lint-unused-mut-variables.rs:5:9
|
2018-08-08 07:28:26 -05:00
|
|
|
|
|
2019-12-28 09:54:27 -06:00
|
|
|
LL | #![warn(unused_mut)]
|
2018-08-08 07:28:26 -05:00
|
|
|
| ^^^^^^^^^^
|
|
|
|
|
2019-12-28 09:54:27 -06:00
|
|
|
warning: variable does not need to be mutable
|
2019-07-26 17:52:37 -05:00
|
|
|
--> $DIR/lint-unused-mut-variables.rs:23:9
|
|
|
|
|
|
|
|
|
LL | mut a: i32,
|
|
|
|
| ----^
|
|
|
|
| |
|
|
|
|
| help: remove this `mut`
|
|
|
|
|
2019-12-28 09:54:27 -06:00
|
|
|
warning: variable does not need to be mutable
|
|
|
|
--> $DIR/lint-unused-mut-variables.rs:14:5
|
|
|
|
|
|
|
|
|
LL | mut a: i32,
|
|
|
|
| ----^
|
|
|
|
| |
|
|
|
|
| help: remove this `mut`
|
|
|
|
|
|
|
|
warning: variable does not need to be mutable
|
2019-07-26 17:52:37 -05:00
|
|
|
--> $DIR/lint-unused-mut-variables.rs:29:9
|
|
|
|
|
|
|
|
|
LL | mut a: i32,
|
|
|
|
| ----^
|
|
|
|
| |
|
|
|
|
| help: remove this `mut`
|
|
|
|
|
2019-12-28 09:54:27 -06:00
|
|
|
warning: variable does not need to be mutable
|
2019-07-26 17:52:37 -05:00
|
|
|
--> $DIR/lint-unused-mut-variables.rs:39:9
|
|
|
|
|
|
|
|
|
LL | mut a: i32,
|
|
|
|
| ----^
|
|
|
|
| |
|
|
|
|
| help: remove this `mut`
|
|
|
|
|
2019-12-28 09:54:27 -06:00
|
|
|
warning: variable does not need to be mutable
|
2019-07-26 17:52:37 -05:00
|
|
|
--> $DIR/lint-unused-mut-variables.rs:48:9
|
|
|
|
|
|
|
|
|
LL | mut a: i32,
|
|
|
|
| ----^
|
|
|
|
| |
|
|
|
|
| help: remove this `mut`
|
|
|
|
|
2019-12-28 09:54:27 -06:00
|
|
|
warning: variable does not need to be mutable
|
2019-07-26 17:52:37 -05:00
|
|
|
--> $DIR/lint-unused-mut-variables.rs:57:9
|
|
|
|
|
|
|
|
|
LL | mut a: i32,
|
|
|
|
| ----^
|
|
|
|
| |
|
|
|
|
| help: remove this `mut`
|
|
|
|
|
2019-12-28 09:54:27 -06:00
|
|
|
warning: variable does not need to be mutable
|
2019-07-26 17:52:37 -05:00
|
|
|
--> $DIR/lint-unused-mut-variables.rs:62:9
|
|
|
|
|
|
|
|
|
LL | mut a: i32,
|
|
|
|
| ----^
|
|
|
|
| |
|
|
|
|
| help: remove this `mut`
|
|
|
|
|
2019-12-28 09:54:27 -06:00
|
|
|
warning: variable does not need to be mutable
|
2020-07-02 00:32:12 -05:00
|
|
|
--> $DIR/lint-unused-mut-variables.rs:107:14
|
2019-07-26 17:52:37 -05:00
|
|
|
|
|
|
|
|
LL | let x = |mut y: isize| 10;
|
|
|
|
| ----^
|
|
|
|
| |
|
|
|
|
| help: remove this `mut`
|
|
|
|
|
2019-12-28 09:54:27 -06:00
|
|
|
warning: variable does not need to be mutable
|
2019-07-26 17:52:37 -05:00
|
|
|
--> $DIR/lint-unused-mut-variables.rs:69:9
|
2018-08-08 07:28:26 -05:00
|
|
|
|
|
2019-03-09 06:03:44 -06:00
|
|
|
LL | let mut a = 3;
|
2018-08-08 07:28:26 -05:00
|
|
|
| ----^
|
|
|
|
| |
|
|
|
|
| help: remove this `mut`
|
|
|
|
|
2019-12-28 09:54:27 -06:00
|
|
|
warning: variable does not need to be mutable
|
2019-07-26 17:52:37 -05:00
|
|
|
--> $DIR/lint-unused-mut-variables.rs:71:9
|
2018-08-08 07:28:26 -05:00
|
|
|
|
|
2019-03-09 06:03:44 -06:00
|
|
|
LL | let mut a = 2;
|
2018-08-08 07:28:26 -05:00
|
|
|
| ----^
|
|
|
|
| |
|
|
|
|
| help: remove this `mut`
|
|
|
|
|
2019-12-28 09:54:27 -06:00
|
|
|
warning: variable does not need to be mutable
|
2019-07-26 17:52:37 -05:00
|
|
|
--> $DIR/lint-unused-mut-variables.rs:73:9
|
2018-08-08 07:28:26 -05:00
|
|
|
|
|
2019-03-09 06:03:44 -06:00
|
|
|
LL | let mut b = 3;
|
2018-08-08 07:28:26 -05:00
|
|
|
| ----^
|
|
|
|
| |
|
|
|
|
| help: remove this `mut`
|
|
|
|
|
2019-12-28 09:54:27 -06:00
|
|
|
warning: variable does not need to be mutable
|
2019-07-26 17:52:37 -05:00
|
|
|
--> $DIR/lint-unused-mut-variables.rs:75:9
|
2018-08-08 07:28:26 -05:00
|
|
|
|
|
2019-03-09 06:03:44 -06:00
|
|
|
LL | let mut a = vec![3];
|
2018-08-08 07:28:26 -05:00
|
|
|
| ----^
|
|
|
|
| |
|
|
|
|
| help: remove this `mut`
|
|
|
|
|
2019-12-28 09:54:27 -06:00
|
|
|
warning: variable does not need to be mutable
|
2019-07-26 17:52:37 -05:00
|
|
|
--> $DIR/lint-unused-mut-variables.rs:77:10
|
2018-08-08 07:28:26 -05:00
|
|
|
|
|
2019-03-09 06:03:44 -06:00
|
|
|
LL | let (mut a, b) = (1, 2);
|
2018-08-08 07:28:26 -05:00
|
|
|
| ----^
|
|
|
|
| |
|
|
|
|
| help: remove this `mut`
|
|
|
|
|
2019-12-28 09:54:27 -06:00
|
|
|
warning: variable does not need to be mutable
|
2019-07-26 17:52:37 -05:00
|
|
|
--> $DIR/lint-unused-mut-variables.rs:79:9
|
2018-08-08 07:28:26 -05:00
|
|
|
|
|
2019-03-09 06:03:44 -06:00
|
|
|
LL | let mut a;
|
2018-08-08 07:28:26 -05:00
|
|
|
| ----^
|
|
|
|
| |
|
|
|
|
| help: remove this `mut`
|
|
|
|
|
2019-12-28 09:54:27 -06:00
|
|
|
warning: variable does not need to be mutable
|
2019-07-26 17:52:37 -05:00
|
|
|
--> $DIR/lint-unused-mut-variables.rs:83:9
|
2018-08-08 07:28:26 -05:00
|
|
|
|
|
2019-03-09 06:03:44 -06:00
|
|
|
LL | let mut b;
|
2018-08-08 07:28:26 -05:00
|
|
|
| ----^
|
|
|
|
| |
|
|
|
|
| help: remove this `mut`
|
|
|
|
|
2019-12-28 09:54:27 -06:00
|
|
|
warning: variable does not need to be mutable
|
2019-07-26 17:52:37 -05:00
|
|
|
--> $DIR/lint-unused-mut-variables.rs:92:9
|
2018-08-08 07:28:26 -05:00
|
|
|
|
|
2019-03-09 06:03:44 -06:00
|
|
|
LL | mut x => {}
|
2018-08-08 07:28:26 -05:00
|
|
|
| ----^
|
|
|
|
| |
|
|
|
|
| help: remove this `mut`
|
|
|
|
|
2019-12-28 09:54:27 -06:00
|
|
|
warning: variable does not need to be mutable
|
2020-07-02 00:32:12 -05:00
|
|
|
--> $DIR/lint-unused-mut-variables.rs:99:10
|
2018-08-08 07:28:26 -05:00
|
|
|
|
|
2020-07-02 00:32:12 -05:00
|
|
|
LL | (mut x, 1) |
|
|
|
|
| ----^
|
|
|
|
| |
|
|
|
|
| help: remove this `mut`
|
2018-08-08 07:28:26 -05:00
|
|
|
|
2019-12-28 09:54:27 -06:00
|
|
|
warning: variable does not need to be mutable
|
2020-07-02 00:32:12 -05:00
|
|
|
--> $DIR/lint-unused-mut-variables.rs:112:9
|
2018-08-08 07:28:26 -05:00
|
|
|
|
|
2019-03-09 06:03:44 -06:00
|
|
|
LL | let mut a = &mut 5;
|
2018-08-08 07:28:26 -05:00
|
|
|
| ----^
|
|
|
|
| |
|
|
|
|
| help: remove this `mut`
|
|
|
|
|
2019-12-28 09:54:27 -06:00
|
|
|
warning: variable does not need to be mutable
|
2020-07-02 00:32:12 -05:00
|
|
|
--> $DIR/lint-unused-mut-variables.rs:117:9
|
2018-08-08 07:28:26 -05:00
|
|
|
|
|
2019-03-09 06:03:44 -06:00
|
|
|
LL | let mut b = (&mut a,);
|
2018-08-08 07:28:26 -05:00
|
|
|
| ----^
|
|
|
|
| |
|
|
|
|
| help: remove this `mut`
|
|
|
|
|
2019-12-28 09:54:27 -06:00
|
|
|
warning: variable does not need to be mutable
|
2020-07-02 00:32:12 -05:00
|
|
|
--> $DIR/lint-unused-mut-variables.rs:120:9
|
2018-08-08 07:28:26 -05:00
|
|
|
|
|
2019-03-09 06:03:44 -06:00
|
|
|
LL | let mut x = &mut 1;
|
2018-08-08 07:28:26 -05:00
|
|
|
| ----^
|
|
|
|
| |
|
|
|
|
| help: remove this `mut`
|
|
|
|
|
2019-12-28 09:54:27 -06:00
|
|
|
warning: variable does not need to be mutable
|
2020-07-02 00:32:12 -05:00
|
|
|
--> $DIR/lint-unused-mut-variables.rs:132:9
|
2018-08-08 07:28:26 -05:00
|
|
|
|
|
2019-03-09 06:03:44 -06:00
|
|
|
LL | let mut v : &mut Vec<()> = &mut vec![];
|
2018-08-08 07:28:26 -05:00
|
|
|
| ----^
|
|
|
|
| |
|
|
|
|
| help: remove this `mut`
|
|
|
|
|
2019-12-28 09:54:27 -06:00
|
|
|
warning: variable does not need to be mutable
|
2020-07-02 00:32:12 -05:00
|
|
|
--> $DIR/lint-unused-mut-variables.rs:187:9
|
2019-09-18 15:31:25 -05:00
|
|
|
|
|
|
|
|
LL | let mut raw_address_of_const = 1;
|
|
|
|
| ----^^^^^^^^^^^^^^^^^^^^
|
|
|
|
| |
|
|
|
|
| help: remove this `mut`
|
|
|
|
|
2019-12-28 09:54:27 -06:00
|
|
|
warning: variable does not need to be mutable
|
2020-07-02 00:32:12 -05:00
|
|
|
--> $DIR/lint-unused-mut-variables.rs:109:13
|
2018-08-08 07:28:26 -05:00
|
|
|
|
|
2019-03-09 06:03:44 -06:00
|
|
|
LL | fn what(mut foo: isize) {}
|
2018-08-08 07:28:26 -05:00
|
|
|
| ----^^^
|
|
|
|
| |
|
|
|
|
| help: remove this `mut`
|
|
|
|
|
2019-12-28 09:54:27 -06:00
|
|
|
warning: variable does not need to be mutable
|
2020-07-02 00:32:12 -05:00
|
|
|
--> $DIR/lint-unused-mut-variables.rs:127:20
|
2018-08-08 07:28:26 -05:00
|
|
|
|
|
|
|
|
LL | fn mut_ref_arg(mut arg : &mut [u8]) -> &mut [u8] {
|
|
|
|
| ----^^^
|
|
|
|
| |
|
|
|
|
| help: remove this `mut`
|
|
|
|
|
|
|
|
error: variable does not need to be mutable
|
2020-07-02 00:32:12 -05:00
|
|
|
--> $DIR/lint-unused-mut-variables.rs:205:9
|
2018-08-08 07:28:26 -05:00
|
|
|
|
|
2019-03-09 06:03:44 -06:00
|
|
|
LL | let mut b = vec![2];
|
2018-08-08 07:28:26 -05:00
|
|
|
| ----^
|
|
|
|
| |
|
|
|
|
| help: remove this `mut`
|
|
|
|
|
|
2020-01-22 17:57:38 -06:00
|
|
|
note: the lint level is defined here
|
2020-07-02 00:32:12 -05:00
|
|
|
--> $DIR/lint-unused-mut-variables.rs:201:8
|
2018-08-08 07:28:26 -05:00
|
|
|
|
|
|
|
|
LL | #[deny(unused_mut)]
|
|
|
|
| ^^^^^^^^^^
|
|
|
|
|
2020-03-11 10:30:09 -05:00
|
|
|
error: aborting due to previous error; 25 warnings emitted
|
2018-08-08 07:28:26 -05:00
|
|
|
|