]> git.lizzy.rs Git - rust.git/blob - tests/ui/eval_order_dependence.stderr
Merge pull request #3269 from rust-lang-nursery/relicense
[rust.git] / tests / ui / eval_order_dependence.stderr
1 error: unsequenced read of a variable
2   --> $DIR/eval_order_dependence.rs:18:28
3    |
4 18 |     let a = { x = 1; 1 } + x;
5    |                            ^
6    |
7    = note: `-D clippy::eval-order-dependence` implied by `-D warnings`
8 note: whether read occurs before this write depends on evaluation order
9   --> $DIR/eval_order_dependence.rs:18:15
10    |
11 18 |     let a = { x = 1; 1 } + x;
12    |               ^^^^^
13
14 error: unsequenced read of a variable
15   --> $DIR/eval_order_dependence.rs:21:5
16    |
17 21 |     x += { x = 20; 2 };
18    |     ^
19    |
20 note: whether read occurs before this write depends on evaluation order
21   --> $DIR/eval_order_dependence.rs:21:12
22    |
23 21 |     x += { x = 20; 2 };
24    |            ^^^^^^
25
26 error: unsequenced read of a variable
27   --> $DIR/eval_order_dependence.rs:27:24
28    |
29 27 |     let foo = Foo { a: x, .. { x = 6; base } };
30    |                        ^
31    |
32 note: whether read occurs before this write depends on evaluation order
33   --> $DIR/eval_order_dependence.rs:27:32
34    |
35 27 |     let foo = Foo { a: x, .. { x = 6; base } };
36    |                                ^^^^^
37
38 error: unsequenced read of a variable
39   --> $DIR/eval_order_dependence.rs:31:9
40    |
41 31 |         x += { x = 20; 2 };
42    |         ^
43    |
44 note: whether read occurs before this write depends on evaluation order
45   --> $DIR/eval_order_dependence.rs:31:16
46    |
47 31 |         x += { x = 20; 2 };
48    |                ^^^^^^
49
50 error: aborting due to 4 previous errors
51