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