Files
rust/tests/ui/lint/unused/lint-unused-mut-variables.stderr

231 lines
5.7 KiB
Plaintext
Raw Normal View History

2019-12-28 15:54:27 +00:00
warning: variable does not need to be mutable
2024-11-06 17:53:59 +00:00
--> $DIR/lint-unused-mut-variables.rs:8:5
2018-08-08 14:28:26 +02:00
|
2019-07-26 19:52:37 -03:00
LL | mut a: i32,
| ----^
| |
| help: remove this `mut`
2018-08-08 14:28:26 +02:00
|
2020-01-22 23:57:38 +00:00
note: the lint level is defined here
2019-07-26 19:52:37 -03:00
--> $DIR/lint-unused-mut-variables.rs:5:9
2018-08-08 14:28:26 +02:00
|
2019-12-28 15:54:27 +00:00
LL | #![warn(unused_mut)]
2018-08-08 14:28:26 +02:00
| ^^^^^^^^^^
2019-12-28 15:54:27 +00:00
warning: variable does not need to be mutable
2024-11-06 17:53:59 +00:00
--> $DIR/lint-unused-mut-variables.rs:22:9
2019-07-26 19:52:37 -03:00
|
LL | mut a: i32,
| ----^
| |
| help: remove this `mut`
2019-12-28 15:54:27 +00:00
warning: variable does not need to be mutable
2024-11-06 17:53:59 +00:00
--> $DIR/lint-unused-mut-variables.rs:13:5
2019-12-28 15:54:27 +00:00
|
LL | mut a: i32,
| ----^
| |
| help: remove this `mut`
warning: variable does not need to be mutable
2024-11-06 17:53:59 +00:00
--> $DIR/lint-unused-mut-variables.rs:28:9
2019-07-26 19:52:37 -03:00
|
LL | mut a: i32,
| ----^
| |
| help: remove this `mut`
2019-12-28 15:54:27 +00:00
warning: variable does not need to be mutable
2024-11-06 17:53:59 +00:00
--> $DIR/lint-unused-mut-variables.rs:38:9
2019-07-26 19:52:37 -03:00
|
LL | mut a: i32,
| ----^
| |
| help: remove this `mut`
2019-12-28 15:54:27 +00:00
warning: variable does not need to be mutable
2024-11-06 17:53:59 +00:00
--> $DIR/lint-unused-mut-variables.rs:47:9
2019-07-26 19:52:37 -03:00
|
LL | mut a: i32,
| ----^
| |
| help: remove this `mut`
2019-12-28 15:54:27 +00:00
warning: variable does not need to be mutable
2024-11-06 17:53:59 +00:00
--> $DIR/lint-unused-mut-variables.rs:56:9
2019-07-26 19:52:37 -03:00
|
LL | mut a: i32,
| ----^
| |
| help: remove this `mut`
2019-12-28 15:54:27 +00:00
warning: variable does not need to be mutable
2024-11-06 17:53:59 +00:00
--> $DIR/lint-unused-mut-variables.rs:61:9
2019-07-26 19:52:37 -03:00
|
LL | mut a: i32,
| ----^
| |
| help: remove this `mut`
2019-12-28 15:54:27 +00:00
warning: variable does not need to be mutable
2024-11-06 17:53:59 +00:00
--> $DIR/lint-unused-mut-variables.rs:106:14
2019-07-26 19:52:37 -03:00
|
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
2024-11-06 17:53:59 +00:00
--> $DIR/lint-unused-mut-variables.rs:68:9
2018-08-08 14:28:26 +02:00
|
2019-03-09 15:03:44 +03:00
LL | let mut a = 3;
2018-08-08 14:28:26 +02:00
| ----^
| |
| help: remove this `mut`
2019-12-28 15:54:27 +00:00
warning: variable does not need to be mutable
2024-11-06 17:53:59 +00:00
--> $DIR/lint-unused-mut-variables.rs:70:9
2018-08-08 14:28:26 +02:00
|
2019-03-09 15:03:44 +03:00
LL | let mut a = 2;
2018-08-08 14:28:26 +02:00
| ----^
| |
| help: remove this `mut`
2019-12-28 15:54:27 +00:00
warning: variable does not need to be mutable
2024-11-06 17:53:59 +00:00
--> $DIR/lint-unused-mut-variables.rs:72:9
2018-08-08 14:28:26 +02:00
|
2019-03-09 15:03:44 +03:00
LL | let mut b = 3;
2018-08-08 14:28:26 +02:00
| ----^
| |
| help: remove this `mut`
2019-12-28 15:54:27 +00:00
warning: variable does not need to be mutable
2024-11-06 17:53:59 +00:00
--> $DIR/lint-unused-mut-variables.rs:74:9
2018-08-08 14:28:26 +02:00
|
2019-03-09 15:03:44 +03:00
LL | let mut a = vec![3];
2018-08-08 14:28:26 +02:00
| ----^
| |
| help: remove this `mut`
2019-12-28 15:54:27 +00:00
warning: variable does not need to be mutable
2024-11-06 17:53:59 +00:00
--> $DIR/lint-unused-mut-variables.rs:76:10
2018-08-08 14:28:26 +02:00
|
2019-03-09 15:03:44 +03:00
LL | let (mut a, b) = (1, 2);
2018-08-08 14:28:26 +02:00
| ----^
| |
| help: remove this `mut`
2019-12-28 15:54:27 +00:00
warning: variable does not need to be mutable
2024-11-06 17:53:59 +00:00
--> $DIR/lint-unused-mut-variables.rs:78:9
2018-08-08 14:28:26 +02:00
|
2019-03-09 15:03:44 +03:00
LL | let mut a;
2018-08-08 14:28:26 +02:00
| ----^
| |
| help: remove this `mut`
2019-12-28 15:54:27 +00:00
warning: variable does not need to be mutable
2024-11-06 17:53:59 +00:00
--> $DIR/lint-unused-mut-variables.rs:82:9
2018-08-08 14:28:26 +02:00
|
2019-03-09 15:03:44 +03:00
LL | let mut b;
2018-08-08 14:28:26 +02:00
| ----^
| |
| help: remove this `mut`
2019-12-28 15:54:27 +00:00
warning: variable does not need to be mutable
2024-11-06 17:53:59 +00:00
--> $DIR/lint-unused-mut-variables.rs:91:9
2018-08-08 14:28:26 +02:00
|
2019-03-09 15:03:44 +03:00
LL | mut x => {}
2018-08-08 14:28:26 +02:00
| ----^
| |
| help: remove this `mut`
2019-12-28 15:54:27 +00:00
warning: variable does not need to be mutable
2024-11-06 17:53:59 +00:00
--> $DIR/lint-unused-mut-variables.rs:98:10
2018-08-08 14:28:26 +02:00
|
2020-07-02 14:32:12 +09:00
LL | (mut x, 1) |
| ----^
| |
| help: remove this `mut`
2018-08-08 14:28:26 +02:00
2019-12-28 15:54:27 +00:00
warning: variable does not need to be mutable
2024-11-06 17:53:59 +00:00
--> $DIR/lint-unused-mut-variables.rs:111:9
2018-08-08 14:28:26 +02:00
|
2019-03-09 15:03:44 +03:00
LL | let mut a = &mut 5;
2018-08-08 14:28:26 +02:00
| ----^
| |
| help: remove this `mut`
2019-12-28 15:54:27 +00:00
warning: variable does not need to be mutable
2024-11-06 17:53:59 +00:00
--> $DIR/lint-unused-mut-variables.rs:116:9
2018-08-08 14:28:26 +02:00
|
2019-03-09 15:03:44 +03:00
LL | let mut b = (&mut a,);
2018-08-08 14:28:26 +02:00
| ----^
| |
| help: remove this `mut`
2019-12-28 15:54:27 +00:00
warning: variable does not need to be mutable
2024-11-06 17:53:59 +00:00
--> $DIR/lint-unused-mut-variables.rs:119:9
2018-08-08 14:28:26 +02:00
|
2019-03-09 15:03:44 +03:00
LL | let mut x = &mut 1;
2018-08-08 14:28:26 +02:00
| ----^
| |
| help: remove this `mut`
2019-12-28 15:54:27 +00:00
warning: variable does not need to be mutable
2024-11-06 17:53:59 +00:00
--> $DIR/lint-unused-mut-variables.rs:131:9
2018-08-08 14:28:26 +02:00
|
2019-03-09 15:03:44 +03:00
LL | let mut v : &mut Vec<()> = &mut vec![];
2018-08-08 14:28:26 +02:00
| ----^
| |
| help: remove this `mut`
2019-12-28 15:54:27 +00:00
warning: variable does not need to be mutable
2024-11-06 17:53:59 +00:00
--> $DIR/lint-unused-mut-variables.rs:186:9
2019-09-18 21:31:25 +01:00
|
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
2024-11-06 17:53:59 +00:00
--> $DIR/lint-unused-mut-variables.rs:108:13
2018-08-08 14:28:26 +02:00
|
2019-03-09 15:03:44 +03:00
LL | fn what(mut foo: isize) {}
2018-08-08 14:28:26 +02:00
| ----^^^
| |
| help: remove this `mut`
2019-12-28 15:54:27 +00:00
warning: variable does not need to be mutable
2024-11-06 17:53:59 +00:00
--> $DIR/lint-unused-mut-variables.rs:126:20
2018-08-08 14:28:26 +02:00
|
LL | fn mut_ref_arg(mut arg : &mut [u8]) -> &mut [u8] {
| ----^^^
| |
| help: remove this `mut`
error: variable does not need to be mutable
2024-11-06 17:53:59 +00:00
--> $DIR/lint-unused-mut-variables.rs:204:9
2018-08-08 14:28:26 +02:00
|
2019-03-09 15:03:44 +03:00
LL | let mut b = vec![2];
2018-08-08 14:28:26 +02:00
| ----^
| |
| help: remove this `mut`
|
2020-01-22 23:57:38 +00:00
note: the lint level is defined here
2024-11-06 17:53:59 +00:00
--> $DIR/lint-unused-mut-variables.rs:200:8
2018-08-08 14:28:26 +02:00
|
LL | #[deny(unused_mut)]
| ^^^^^^^^^^
2023-04-28 19:35:40 +02:00
warning: variable does not need to be mutable
2024-11-06 17:53:59 +00:00
--> $DIR/lint-unused-mut-variables.rs:211:28
2023-04-28 19:35:40 +02:00
|
LL | fn write_through_reference(mut arg: &mut Arg) {
| ----^^^
| |
| help: remove this `mut`
error: aborting due to 1 previous error; 26 warnings emitted
2018-08-08 14:28:26 +02:00