2017-02-07 20:05:30 +00:00
|
|
|
error: unsequenced read of a variable
|
2018-10-06 16:18:06 +00:00
|
|
|
--> $DIR/eval_order_dependence.rs:18:28
|
|
|
|
|
|
|
|
|
18 | let a = { x = 1; 1 } + x;
|
|
|
|
| ^
|
|
|
|
|
|
|
|
|
= note: `-D clippy::eval-order-dependence` implied by `-D warnings`
|
2017-02-07 20:05:30 +00:00
|
|
|
note: whether read occurs before this write depends on evaluation order
|
2018-10-06 16:18:06 +00:00
|
|
|
--> $DIR/eval_order_dependence.rs:18:15
|
|
|
|
|
|
|
|
|
18 | let a = { x = 1; 1 } + x;
|
|
|
|
| ^^^^^
|
2017-02-07 20:05:30 +00:00
|
|
|
|
|
|
|
error: unsequenced read of a variable
|
2018-10-06 16:18:06 +00:00
|
|
|
--> $DIR/eval_order_dependence.rs:21:5
|
2017-02-07 20:05:30 +00:00
|
|
|
|
|
2018-10-06 16:18:06 +00:00
|
|
|
21 | x += { x = 20; 2 };
|
2017-02-07 20:05:30 +00:00
|
|
|
| ^
|
|
|
|
|
|
|
|
|
note: whether read occurs before this write depends on evaluation order
|
2018-10-06 16:18:06 +00:00
|
|
|
--> $DIR/eval_order_dependence.rs:21:12
|
2017-02-07 20:05:30 +00:00
|
|
|
|
|
2018-10-06 16:18:06 +00:00
|
|
|
21 | x += { x = 20; 2 };
|
2017-02-07 20:05:30 +00:00
|
|
|
| ^^^^^^
|
|
|
|
|
|
|
|
error: unsequenced read of a variable
|
2018-10-06 16:18:06 +00:00
|
|
|
--> $DIR/eval_order_dependence.rs:27:24
|
2017-02-07 20:05:30 +00:00
|
|
|
|
|
2018-10-06 16:18:06 +00:00
|
|
|
27 | let foo = Foo { a: x, .. { x = 6; base } };
|
2017-02-07 20:05:30 +00:00
|
|
|
| ^
|
|
|
|
|
|
|
|
|
note: whether read occurs before this write depends on evaluation order
|
2018-10-06 16:18:06 +00:00
|
|
|
--> $DIR/eval_order_dependence.rs:27:32
|
2017-02-07 20:05:30 +00:00
|
|
|
|
|
2018-10-06 16:18:06 +00:00
|
|
|
27 | let foo = Foo { a: x, .. { x = 6; base } };
|
2017-02-07 20:05:30 +00:00
|
|
|
| ^^^^^
|
|
|
|
|
|
|
|
error: unsequenced read of a variable
|
2018-10-06 16:18:06 +00:00
|
|
|
--> $DIR/eval_order_dependence.rs:31:9
|
2017-02-07 20:05:30 +00:00
|
|
|
|
|
2018-10-06 16:18:06 +00:00
|
|
|
31 | x += { x = 20; 2 };
|
2017-02-07 20:05:30 +00:00
|
|
|
| ^
|
|
|
|
|
|
|
|
|
note: whether read occurs before this write depends on evaluation order
|
2018-10-06 16:18:06 +00:00
|
|
|
--> $DIR/eval_order_dependence.rs:31:16
|
2017-02-07 20:05:30 +00:00
|
|
|
|
|
2018-10-06 16:18:06 +00:00
|
|
|
31 | x += { x = 20; 2 };
|
2017-02-07 20:05:30 +00:00
|
|
|
| ^^^^^^
|
|
|
|
|
2018-01-16 16:06:27 +00:00
|
|
|
error: aborting due to 4 previous errors
|
|
|
|
|