]> git.lizzy.rs Git - rust.git/blob - clippy_tests/examples/eval_order_dependence.stderr
d542cacc4bd9829e25ea92ff4c985d40f1609af1
[rust.git] / clippy_tests / examples / eval_order_dependence.stderr
1 error: unsequenced read of a variable
2  --> eval_order_dependence.rs:8:28
3   |
4 8 |     let a = { x = 1; 1 } + x;
5   |                            ^
6   |
7   = note: `-D eval-order-dependence` implied by `-D warnings`
8 note: whether read occurs before this write depends on evaluation order
9  --> eval_order_dependence.rs:8:15
10   |
11 8 |     let a = { x = 1; 1 } + x;
12   |               ^^^^^
13
14 error: unsequenced read of a variable
15   --> eval_order_dependence.rs:11:5
16    |
17 11 |     x += { x = 20; 2 };
18    |     ^
19    |
20    = note: `-D eval-order-dependence` implied by `-D warnings`
21 note: whether read occurs before this write depends on evaluation order
22   --> eval_order_dependence.rs:11:12
23    |
24 11 |     x += { x = 20; 2 };
25    |            ^^^^^^
26
27 error: unsequenced read of a variable
28   --> eval_order_dependence.rs:17:24
29    |
30 17 |     let foo = Foo { a: x, .. { x = 6; base } };
31    |                        ^
32    |
33    = note: `-D eval-order-dependence` implied by `-D warnings`
34 note: whether read occurs before this write depends on evaluation order
35   --> eval_order_dependence.rs:17:32
36    |
37 17 |     let foo = Foo { a: x, .. { x = 6; base } };
38    |                                ^^^^^
39
40 error: unsequenced read of a variable
41   --> eval_order_dependence.rs:21:9
42    |
43 21 |         x += { x = 20; 2 };
44    |         ^
45    |
46    = note: `-D eval-order-dependence` implied by `-D warnings`
47 note: whether read occurs before this write depends on evaluation order
48   --> eval_order_dependence.rs:21:16
49    |
50 21 |         x += { x = 20; 2 };
51    |                ^^^^^^
52
53 error: aborting due to previous error(s)
54
55 error: Could not compile `clippy_tests`.
56
57 To learn more, run the command again with --verbose.