Fixing binop_separator="Back" for ranges

Hardcoded Separator::Place=Front in call to rewrite_pair for range
caused binop_separator="Back" to be hendled incorrectly

Fixed rewrite_pair call and the example in Configuration.md showing
the faulty behaviour
This commit is contained in:
Chris Stinson 2018-01-16 17:39:21 +13:00
parent 13a0bb9158
commit 4c4e079613
2 changed files with 3 additions and 3 deletions

View File

@ -341,8 +341,8 @@ fn main() {
let sum = 123456789012345678901234567890 + 123456789012345678901234567890 +
123456789012345678901234567890;
let range = aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
..bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb; // 🐜 See #2364.
let range = aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa..
bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb;
}
```

View File

@ -250,7 +250,7 @@ fn needs_space_before_range(context: &RewriteContext, lhs: &ast::Expr) -> bool {
PairParts::new("", &sp_delim, ""),
context,
shape,
SeparatorPlace::Front,
context.config.binop_separator(),
)
}
(None, Some(rhs)) => {