From f8eedcba5f47fe14ee821d95e7f58cef4d46b50d Mon Sep 17 00:00:00 2001 From: David Alber Date: Sun, 12 Nov 2017 10:14:00 -0800 Subject: [PATCH] Adding an example for `combine_control_expr = false` Fixes #2132. --- Configurations.md | 51 +++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 51 insertions(+) diff --git a/Configurations.md b/Configurations.md index 337b1600061..14ad98cb813 100644 --- a/Configurations.md +++ b/Configurations.md @@ -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`