2020-05-21 19:00:00 -05:00
|
|
|
warning: value assigned to `last` is never read
|
2021-04-18 19:00:00 -05:00
|
|
|
--> $DIR/liveness-upvars.rs:10:9
|
2020-05-21 19:00:00 -05:00
|
|
|
|
|
|
|
|
LL | last = Some(s);
|
|
|
|
| ^^^^
|
|
|
|
|
|
2022-09-18 10:55:36 -05:00
|
|
|
= help: maybe it is overwritten before being read?
|
2020-05-21 19:00:00 -05:00
|
|
|
note: the lint level is defined here
|
2021-04-18 19:00:00 -05:00
|
|
|
--> $DIR/liveness-upvars.rs:4:9
|
2020-05-21 19:00:00 -05:00
|
|
|
|
|
|
|
|
LL | #![warn(unused)]
|
|
|
|
| ^^^^^^
|
|
|
|
= note: `#[warn(unused_assignments)]` implied by `#[warn(unused)]`
|
|
|
|
|
|
|
|
warning: unused variable: `last`
|
2021-04-18 19:00:00 -05:00
|
|
|
--> $DIR/liveness-upvars.rs:10:9
|
2020-05-21 19:00:00 -05:00
|
|
|
|
|
|
|
|
LL | last = Some(s);
|
|
|
|
| ^^^^
|
|
|
|
|
|
|
|
|
= help: did you mean to capture by reference instead?
|
2022-09-18 10:55:36 -05:00
|
|
|
= note: `#[warn(unused_variables)]` implied by `#[warn(unused)]`
|
2020-05-21 19:00:00 -05:00
|
|
|
|
|
|
|
warning: unused variable: `sum`
|
2021-04-18 19:00:00 -05:00
|
|
|
--> $DIR/liveness-upvars.rs:22:9
|
2020-05-21 19:00:00 -05:00
|
|
|
|
|
|
|
|
LL | sum += x;
|
|
|
|
| ^^^
|
|
|
|
|
|
|
|
|
= help: did you mean to capture by reference instead?
|
|
|
|
|
|
|
|
warning: value captured by `c` is never read
|
2021-04-18 19:00:00 -05:00
|
|
|
--> $DIR/liveness-upvars.rs:32:9
|
2020-05-21 19:00:00 -05:00
|
|
|
|
|
|
|
|
LL | c = 1;
|
|
|
|
| ^
|
|
|
|
|
|
|
|
|
= help: did you mean to capture by reference instead?
|
|
|
|
|
|
|
|
warning: value captured by `c` is never read
|
2021-04-18 19:00:00 -05:00
|
|
|
--> $DIR/liveness-upvars.rs:36:9
|
2020-05-21 19:00:00 -05:00
|
|
|
|
|
|
|
|
LL | c = 1;
|
|
|
|
| ^
|
|
|
|
|
|
|
|
|
= help: did you mean to capture by reference instead?
|
|
|
|
|
|
|
|
warning: unused variable: `c`
|
2021-04-18 19:00:00 -05:00
|
|
|
--> $DIR/liveness-upvars.rs:42:9
|
2020-05-21 19:00:00 -05:00
|
|
|
|
|
|
|
|
LL | c += 1;
|
|
|
|
| ^
|
|
|
|
|
|
|
|
|
= help: did you mean to capture by reference instead?
|
|
|
|
|
|
|
|
warning: value assigned to `c` is never read
|
2021-04-18 19:00:00 -05:00
|
|
|
--> $DIR/liveness-upvars.rs:45:9
|
2020-05-21 19:00:00 -05:00
|
|
|
|
|
|
|
|
LL | c += 1;
|
|
|
|
| ^
|
|
|
|
|
|
|
|
|
= help: maybe it is overwritten before being read?
|
|
|
|
|
|
|
|
warning: unused variable: `c`
|
2021-04-18 19:00:00 -05:00
|
|
|
--> $DIR/liveness-upvars.rs:45:9
|
2020-05-21 19:00:00 -05:00
|
|
|
|
|
|
|
|
LL | c += 1;
|
|
|
|
| ^
|
|
|
|
|
|
|
|
|
= help: did you mean to capture by reference instead?
|
|
|
|
|
|
|
|
warning: value assigned to `c` is never read
|
2021-04-18 19:00:00 -05:00
|
|
|
--> $DIR/liveness-upvars.rs:58:9
|
2020-05-21 19:00:00 -05:00
|
|
|
|
|
|
|
|
LL | c += 1;
|
|
|
|
| ^
|
|
|
|
|
|
|
|
|
= help: maybe it is overwritten before being read?
|
|
|
|
|
|
|
|
warning: value assigned to `c` is never read
|
2021-04-18 19:00:00 -05:00
|
|
|
--> $DIR/liveness-upvars.rs:64:9
|
2020-05-21 19:00:00 -05:00
|
|
|
|
|
|
|
|
LL | c += 1;
|
|
|
|
| ^
|
|
|
|
|
|
|
|
|
= help: maybe it is overwritten before being read?
|
|
|
|
|
|
|
|
warning: value assigned to `d` is never read
|
2021-04-18 19:00:00 -05:00
|
|
|
--> $DIR/liveness-upvars.rs:73:13
|
2020-05-21 19:00:00 -05:00
|
|
|
|
|
|
|
|
LL | d = Some("d1");
|
|
|
|
| ^
|
|
|
|
|
|
|
|
|
= help: maybe it is overwritten before being read?
|
|
|
|
|
|
|
|
warning: value assigned to `e` is never read
|
2021-04-18 19:00:00 -05:00
|
|
|
--> $DIR/liveness-upvars.rs:77:13
|
2020-05-21 19:00:00 -05:00
|
|
|
|
|
|
|
|
LL | e = Some("e1");
|
|
|
|
| ^
|
|
|
|
|
|
|
|
|
= help: maybe it is overwritten before being read?
|
|
|
|
|
|
|
|
warning: value assigned to `e` is never read
|
2021-04-18 19:00:00 -05:00
|
|
|
--> $DIR/liveness-upvars.rs:79:13
|
2020-05-21 19:00:00 -05:00
|
|
|
|
|
|
|
|
LL | e = Some("e2");
|
|
|
|
| ^
|
|
|
|
|
|
|
|
|
= help: maybe it is overwritten before being read?
|
|
|
|
|
|
|
|
warning: unused variable: `e`
|
2021-04-18 19:00:00 -05:00
|
|
|
--> $DIR/liveness-upvars.rs:77:13
|
2020-05-21 19:00:00 -05:00
|
|
|
|
|
|
|
|
LL | e = Some("e1");
|
|
|
|
| ^
|
|
|
|
|
|
|
|
|
= help: did you mean to capture by reference instead?
|
|
|
|
|
|
|
|
warning: value assigned to `v` is never read
|
2021-04-18 19:00:00 -05:00
|
|
|
--> $DIR/liveness-upvars.rs:87:13
|
2020-05-21 19:00:00 -05:00
|
|
|
|
|
|
|
|
LL | v = T::default();
|
|
|
|
| ^
|
|
|
|
|
|
|
|
|
= help: maybe it is overwritten before being read?
|
|
|
|
|
|
|
|
warning: value assigned to `z` is never read
|
2021-04-18 19:00:00 -05:00
|
|
|
--> $DIR/liveness-upvars.rs:99:17
|
2020-05-21 19:00:00 -05:00
|
|
|
|
|
|
|
|
LL | z = T::default();
|
|
|
|
| ^
|
|
|
|
|
|
|
|
|
= help: maybe it is overwritten before being read?
|
|
|
|
|
|
|
|
warning: unused variable: `z`
|
2021-04-18 19:00:00 -05:00
|
|
|
--> $DIR/liveness-upvars.rs:99:17
|
2020-05-21 19:00:00 -05:00
|
|
|
|
|
|
|
|
LL | z = T::default();
|
|
|
|
| ^
|
|
|
|
|
|
|
|
|
= help: did you mean to capture by reference instead?
|
|
|
|
|
2021-04-18 19:00:00 -05:00
|
|
|
warning: value assigned to `state` is never read
|
|
|
|
--> $DIR/liveness-upvars.rs:125:9
|
|
|
|
|
|
|
|
|
LL | state = 4;
|
|
|
|
| ^^^^^
|
|
|
|
|
|
|
|
|
= help: maybe it is overwritten before being read?
|
|
|
|
|
|
|
|
warning: value assigned to `state` is never read
|
|
|
|
--> $DIR/liveness-upvars.rs:128:9
|
|
|
|
|
|
|
|
|
LL | state = 5;
|
|
|
|
| ^^^^^
|
|
|
|
|
|
|
|
|
= help: maybe it is overwritten before being read?
|
|
|
|
|
|
|
|
warning: unused variable: `state`
|
|
|
|
--> $DIR/liveness-upvars.rs:125:9
|
|
|
|
|
|
|
|
|
LL | state = 4;
|
|
|
|
| ^^^^^
|
|
|
|
|
|
|
|
|
= help: did you mean to capture by reference instead?
|
|
|
|
|
|
|
|
warning: value assigned to `s` is never read
|
|
|
|
--> $DIR/liveness-upvars.rs:137:9
|
|
|
|
|
|
|
|
|
LL | s = 1;
|
|
|
|
| ^
|
|
|
|
|
|
|
|
|
= help: maybe it is overwritten before being read?
|
|
|
|
|
|
|
|
warning: value assigned to `s` is never read
|
|
|
|
--> $DIR/liveness-upvars.rs:139:9
|
|
|
|
|
|
|
|
|
LL | s = yield ();
|
|
|
|
| ^
|
|
|
|
|
|
|
|
|
= help: maybe it is overwritten before being read?
|
|
|
|
|
|
|
|
warning: 22 warnings emitted
|
2020-05-21 19:00:00 -05:00
|
|
|
|