clean tests/ui/eval_order_dependence.rs

Cleaning the empty lines for clarity.
This commit is contained in:
Luis de Bethencourt 2017-05-11 12:08:07 +01:00
parent fbc6b26592
commit bc9cdf1d64
2 changed files with 12 additions and 14 deletions

View file

@ -7,7 +7,6 @@ fn main() {
let mut x = 0; let mut x = 0;
let a = { x = 1; 1 } + x; let a = { x = 1; 1 } + x;
// Example from iss#277 // Example from iss#277
x += { x = 20; 2 }; x += { x = 20; 2 };
@ -16,7 +15,6 @@ fn main() {
struct Foo { a: i32, b: i32 }; struct Foo { a: i32, b: i32 };
let base = Foo { a: 4, b: 5 }; let base = Foo { a: 4, b: 5 };
let foo = Foo { a: x, .. { x = 6; base } }; let foo = Foo { a: x, .. { x = 6; base } };
// ...inside a closure? // ...inside a closure?
let closure = || { let closure = || {
let mut x = 0; let mut x = 0;

View file

@ -16,39 +16,39 @@ note: whether read occurs before this write depends on evaluation order
| ^^^^^ | ^^^^^
error: unsequenced read of a variable error: unsequenced read of a variable
--> $DIR/eval_order_dependence.rs:12:5 --> $DIR/eval_order_dependence.rs:11:5
| |
12 | x += { x = 20; 2 }; 11 | x += { x = 20; 2 };
| ^ | ^
| |
note: whether read occurs before this write depends on evaluation order note: whether read occurs before this write depends on evaluation order
--> $DIR/eval_order_dependence.rs:12:12 --> $DIR/eval_order_dependence.rs:11:12
| |
12 | x += { x = 20; 2 }; 11 | x += { x = 20; 2 };
| ^^^^^^ | ^^^^^^
error: unsequenced read of a variable error: unsequenced read of a variable
--> $DIR/eval_order_dependence.rs:18:24 --> $DIR/eval_order_dependence.rs:17:24
| |
18 | let foo = Foo { a: x, .. { x = 6; base } }; 17 | let foo = Foo { a: x, .. { x = 6; base } };
| ^ | ^
| |
note: whether read occurs before this write depends on evaluation order note: whether read occurs before this write depends on evaluation order
--> $DIR/eval_order_dependence.rs:18:32 --> $DIR/eval_order_dependence.rs:17:32
| |
18 | let foo = Foo { a: x, .. { x = 6; base } }; 17 | let foo = Foo { a: x, .. { x = 6; base } };
| ^^^^^ | ^^^^^
error: unsequenced read of a variable error: unsequenced read of a variable
--> $DIR/eval_order_dependence.rs:23:9 --> $DIR/eval_order_dependence.rs:21:9
| |
23 | x += { x = 20; 2 }; 21 | x += { x = 20; 2 };
| ^ | ^
| |
note: whether read occurs before this write depends on evaluation order note: whether read occurs before this write depends on evaluation order
--> $DIR/eval_order_dependence.rs:23:16 --> $DIR/eval_order_dependence.rs:21:16
| |
23 | x += { x = 20; 2 }; 21 | x += { x = 20; 2 };
| ^^^^^^ | ^^^^^^
error: aborting due to 4 previous errors error: aborting due to 4 previous errors