diff --git a/src/patterns.rs b/src/patterns.rs index c58a98627ff5..91f13e20dacd 100644 --- a/src/patterns.rs +++ b/src/patterns.rs @@ -59,16 +59,6 @@ impl Rewrite for Pat { 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 @@ impl Rewrite for Pat { 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));