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:
parent
13a0bb9158
commit
4c4e079613
@ -341,8 +341,8 @@ fn main() {
|
||||
let sum = 123456789012345678901234567890 + 123456789012345678901234567890 +
|
||||
123456789012345678901234567890;
|
||||
|
||||
let range = aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
|
||||
..bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb; // 🐜 See #2364.
|
||||
let range = aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa..
|
||||
bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb;
|
||||
}
|
||||
```
|
||||
|
||||
|
@ -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)) => {
|
||||
|
Loading…
Reference in New Issue
Block a user