diff --git a/src/expr.rs b/src/expr.rs index 8266f95fd70..9b3ecdb7542 100644 --- a/src/expr.rs +++ b/src/expr.rs @@ -1860,7 +1860,10 @@ fn rewrite_let( // TODO(ytmimi) comments could appear between `let` and the `pat` // 4 = "let ".len() - let pat_shape = shape.offset_left(4)?; + let mut pat_shape = shape.offset_left(4)?; + if context.config.version() == Version::Two { + pat_shape = pat_shape.sub_width(2)?; + } let pat_str = pat.rewrite(context, pat_shape)?; result.push_str(&pat_str);