mirror of
https://github.com/rust-lang/rust-clippy
synced 2024-11-14 08:57:30 +00:00
51 lines
1.4 KiB
Text
51 lines
1.4 KiB
Text
error: unsequenced read of a variable
|
|
--> $DIR/eval_order_dependence.rs:18:28
|
|
|
|
|
18 | let a = { x = 1; 1 } + 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:18:15
|
|
|
|
|
18 | let a = { x = 1; 1 } + x;
|
|
| ^^^^^
|
|
|
|
error: unsequenced read of a variable
|
|
--> $DIR/eval_order_dependence.rs:21:5
|
|
|
|
|
21 | x += { x = 20; 2 };
|
|
| ^
|
|
|
|
|
note: whether read occurs before this write depends on evaluation order
|
|
--> $DIR/eval_order_dependence.rs:21:12
|
|
|
|
|
21 | x += { x = 20; 2 };
|
|
| ^^^^^^
|
|
|
|
error: unsequenced read of a variable
|
|
--> $DIR/eval_order_dependence.rs:27:24
|
|
|
|
|
27 | let foo = Foo { a: x, .. { x = 6; base } };
|
|
| ^
|
|
|
|
|
note: whether read occurs before this write depends on evaluation order
|
|
--> $DIR/eval_order_dependence.rs:27:32
|
|
|
|
|
27 | let foo = Foo { a: x, .. { x = 6; base } };
|
|
| ^^^^^
|
|
|
|
error: unsequenced read of a variable
|
|
--> $DIR/eval_order_dependence.rs:31:9
|
|
|
|
|
31 | x += { x = 20; 2 };
|
|
| ^
|
|
|
|
|
note: whether read occurs before this write depends on evaluation order
|
|
--> $DIR/eval_order_dependence.rs:31:16
|
|
|
|
|
31 | x += { x = 20; 2 };
|
|
| ^^^^^^
|
|
|
|
error: aborting due to 4 previous errors
|
|
|