about summary refs log tree commit diff
path: root/src/expr.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/expr.rs')
-rw-r--r--src/expr.rs7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/expr.rs b/src/expr.rs
index 1df0f2a96d0..6ab9e1c3393 100644
--- a/src/expr.rs
+++ b/src/expr.rs
@@ -1137,7 +1137,12 @@ fn rewrite_match(context: &RewriteContext,
     };
     let mut result = format!("match {}{}{{", cond_str, block_sep);
 
-    let arm_shape = shape.block_indent(context.config.tab_spaces);
+    let arm_shape = if context.config.indent_match_arms {
+        shape.block_indent(context.config.tab_spaces)
+    } else {
+        shape.block_indent(0)
+    };
+
     let arm_indent_str = arm_shape.indent.to_string(context.config);
 
     let open_brace_pos = context.codemap.span_after(mk_sp(cond.span.hi, arm_start_pos(&arms[0])),