2017-02-07 20:05:30 +00:00
|
|
|
error: unsequenced read of a variable
|
|
|
|
--> $DIR/eval_order_dependence.rs:8:28
|
|
|
|
|
|
|
|
|
8 | let a = { x = 1; 1 } + x;
|
|
|
|
| ^
|
|
|
|
|
|
|
|
|
note: lint level defined here
|
|
|
|
--> $DIR/eval_order_dependence.rs:4:8
|
|
|
|
|
|
|
|
|
4 | #[deny(eval_order_dependence)]
|
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^
|
|
|
|
note: whether read occurs before this write depends on evaluation order
|
|
|
|
--> $DIR/eval_order_dependence.rs:8:15
|
|
|
|
|
|
|
|
|
8 | let a = { x = 1; 1 } + x;
|
|
|
|
| ^^^^^
|
|
|
|
|
|
|
|
error: unsequenced read of a variable
|
|
|
|
--> $DIR/eval_order_dependence.rs:12:5
|
|
|
|
|
|
2017-02-08 13:58:07 +00:00
|
|
|
12 | x += { x = 20; 2 };
|
2017-02-07 20:05:30 +00:00
|
|
|
| ^
|
|
|
|
|
|
|
|
|
note: whether read occurs before this write depends on evaluation order
|
|
|
|
--> $DIR/eval_order_dependence.rs:12:12
|
|
|
|
|
|
2017-02-08 13:58:07 +00:00
|
|
|
12 | x += { x = 20; 2 };
|
2017-02-07 20:05:30 +00:00
|
|
|
| ^^^^^^
|
|
|
|
|
|
|
|
error: unsequenced read of a variable
|
|
|
|
--> $DIR/eval_order_dependence.rs:18:24
|
|
|
|
|
|
|
|
|
18 | let foo = Foo { a: x, .. { x = 6; base } };
|
|
|
|
| ^
|
|
|
|
|
|
|
|
|
note: whether read occurs before this write depends on evaluation order
|
|
|
|
--> $DIR/eval_order_dependence.rs:18:32
|
|
|
|
|
|
|
|
|
18 | let foo = Foo { a: x, .. { x = 6; base } };
|
|
|
|
| ^^^^^
|
|
|
|
|
|
|
|
error: unsequenced read of a variable
|
|
|
|
--> $DIR/eval_order_dependence.rs:23:9
|
|
|
|
|
|
2017-02-08 13:58:07 +00:00
|
|
|
23 | x += { x = 20; 2 };
|
2017-02-07 20:05:30 +00:00
|
|
|
| ^
|
|
|
|
|
|
|
|
|
note: whether read occurs before this write depends on evaluation order
|
|
|
|
--> $DIR/eval_order_dependence.rs:23:16
|
|
|
|
|
|
2017-02-08 13:58:07 +00:00
|
|
|
23 | x += { x = 20; 2 };
|
2017-02-07 20:05:30 +00:00
|
|
|
| ^^^^^^
|
|
|
|
|
|
|
|
error: aborting due to 4 previous errors
|
|
|
|
|