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)]
- | ^^^^^^^^^^^^^^^^^^^^^
+ --> $DIR/eval_order_dependence.rs:15:9
+ |
+LL | } + x;
+ | ^
+ |
+ = note: `-D clippy::eval-order-dependence` implied by `-D warnings`
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;
- | ^^^^^
+ --> $DIR/eval_order_dependence.rs:13:9
+ |
+LL | x = 1;
+ | ^^^^^
error: unsequenced read of a variable
- --> $DIR/eval_order_dependence.rs:12:5
+ --> $DIR/eval_order_dependence.rs:18:5
|
-12 | x += { x = 20; 2 };
+LL | x += {
| ^
|
note: whether read occurs before this write depends on evaluation order
- --> $DIR/eval_order_dependence.rs:12:12
+ --> $DIR/eval_order_dependence.rs:19:9
|
-12 | x += { x = 20; 2 };
- | ^^^^^^
+LL | x = 20;
+ | ^^^^^^
error: unsequenced read of a variable
- --> $DIR/eval_order_dependence.rs:18:24
+ --> $DIR/eval_order_dependence.rs:31:12
|
-18 | let foo = Foo { a: x, .. { x = 6; base } };
- | ^
+LL | a: x,
+ | ^
|
note: whether read occurs before this write depends on evaluation order
- --> $DIR/eval_order_dependence.rs:18:32
+ --> $DIR/eval_order_dependence.rs:33:13
|
-18 | let foo = Foo { a: x, .. { x = 6; base } };
- | ^^^^^
+LL | x = 6;
+ | ^^^^^
error: unsequenced read of a variable
- --> $DIR/eval_order_dependence.rs:23:9
+ --> $DIR/eval_order_dependence.rs:40:9
|
-23 | x += { x = 20; 2 };
+LL | x += {
| ^
|
note: whether read occurs before this write depends on evaluation order
- --> $DIR/eval_order_dependence.rs:23:16
+ --> $DIR/eval_order_dependence.rs:41:13
|
-23 | x += { x = 20; 2 };
- | ^^^^^^
+LL | x = 20;
+ | ^^^^^^
error: aborting due to 4 previous errors