Adding an example for combine_control_expr = false

Fixes #2132.
This commit is contained in:
David Alber 2017-11-12 10:14:00 -08:00
parent ffe8c73cf6
commit f8eedcba5f

View File

@ -354,6 +354,57 @@ fn example() {
#### `false`:
```rust
fn example() {
// If
foo!(
if x {
foo();
} else {
bar();
}
);
// IfLet
foo!(
if let Some(..) = x {
foo();
} else {
bar();
}
);
// While
foo!(
while x {
foo();
bar();
}
);
// WhileLet
foo!(
while let Some(..) = x {
foo();
bar();
}
);
// ForLoop
foo!(
for x in y {
foo();
bar();
}
);
// Loop
foo!(
loop {
foo();
bar();
}
);
}
```
## `comment_width`