mirror of
https://github.com/rust-lang/rust.git
synced 2026-05-04 09:53:04 +03:00
Temporarily replace RangeEnd::Included with _
This commit is contained in:
+13
-10
@@ -59,16 +59,6 @@ fn rewrite(&self, context: &RewriteContext, shape: Shape) -> Option<String> {
|
||||
None
|
||||
},
|
||||
PatKind::Range(ref lhs, ref rhs, ref end_kind) => match *end_kind {
|
||||
RangeEnd::Included => rewrite_pair(
|
||||
&**lhs,
|
||||
&**rhs,
|
||||
"",
|
||||
"...",
|
||||
"",
|
||||
context,
|
||||
shape,
|
||||
SeparatorPlace::Front,
|
||||
),
|
||||
RangeEnd::Excluded => rewrite_pair(
|
||||
&**lhs,
|
||||
&**rhs,
|
||||
@@ -79,6 +69,19 @@ fn rewrite(&self, context: &RewriteContext, shape: Shape) -> Option<String> {
|
||||
shape,
|
||||
SeparatorPlace::Front,
|
||||
),
|
||||
// FIXME: Change _ to RangeEnd::Included(RangeSyntax::DotDotDot)
|
||||
// and add RangeEnd::Included(RangeSyntax::DotDotEq)
|
||||
// once rust PR #44709 gets merged
|
||||
_ => rewrite_pair(
|
||||
&**lhs,
|
||||
&**rhs,
|
||||
"",
|
||||
"...",
|
||||
"",
|
||||
context,
|
||||
shape,
|
||||
SeparatorPlace::Front,
|
||||
),
|
||||
},
|
||||
PatKind::Ref(ref pat, mutability) => {
|
||||
let prefix = format!("&{}", format_mutability(mutability));
|
||||
|
||||
Reference in New Issue
Block a user