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