Change ... to ..= where applicable

This commit is contained in:
Aaron Kutch
2019-06-14 12:24:38 -05:00
parent fc550d4295
commit 363940bbe1
9 changed files with 45 additions and 45 deletions

View File

@@ -191,7 +191,7 @@ benches! {
fn case11_mask_mult_bool_match_range(bytes: &mut [u8]) { fn case11_mask_mult_bool_match_range(bytes: &mut [u8]) {
fn is_ascii_lowercase(b: u8) -> bool { fn is_ascii_lowercase(b: u8) -> bool {
match b { match b {
b'a'...b'z' => true, b'a'..=b'z' => true,
_ => false _ => false
} }
} }
@@ -203,7 +203,7 @@ benches! {
fn case12_mask_shifted_bool_match_range(bytes: &mut [u8]) { fn case12_mask_shifted_bool_match_range(bytes: &mut [u8]) {
fn is_ascii_lowercase(b: u8) -> bool { fn is_ascii_lowercase(b: u8) -> bool {
match b { match b {
b'a'...b'z' => true, b'a'..=b'z' => true,
_ => false _ => false
} }
} }
@@ -215,7 +215,7 @@ benches! {
fn case13_subtract_shifted_bool_match_range(bytes: &mut [u8]) { fn case13_subtract_shifted_bool_match_range(bytes: &mut [u8]) {
fn is_ascii_lowercase(b: u8) -> bool { fn is_ascii_lowercase(b: u8) -> bool {
match b { match b {
b'a'...b'z' => true, b'a'..=b'z' => true,
_ => false _ => false
} }
} }
@@ -227,7 +227,7 @@ benches! {
fn case14_subtract_multiplied_bool_match_range(bytes: &mut [u8]) { fn case14_subtract_multiplied_bool_match_range(bytes: &mut [u8]) {
fn is_ascii_lowercase(b: u8) -> bool { fn is_ascii_lowercase(b: u8) -> bool {
match b { match b {
b'a'...b'z' => true, b'a'..=b'z' => true,
_ => false _ => false
} }
} }

View File

@@ -123,7 +123,7 @@ impl From<char> for u32 {
} }
} }
/// Maps a byte in 0x00...0xFF to a `char` whose code point has the same value, in U+0000 to U+00FF. /// Maps a byte in 0x00..=0xFF to a `char` whose code point has the same value, in U+0000..=U+00FF.
/// ///
/// Unicode is designed such that this effectively decodes bytes /// Unicode is designed such that this effectively decodes bytes
/// with the character encoding that IANA calls ISO-8859-1. /// with the character encoding that IANA calls ISO-8859-1.

View File

@@ -1042,8 +1042,8 @@ impl char {
/// Checks if the value is an ASCII alphabetic character: /// Checks if the value is an ASCII alphabetic character:
/// ///
/// - U+0041 'A' ... U+005A 'Z', or /// - U+0041 'A' ..= U+005A 'Z', or
/// - U+0061 'a' ... U+007A 'z'. /// - U+0061 'a' ..= U+007A 'z'.
/// ///
/// # Examples /// # Examples
/// ///
@@ -1075,7 +1075,7 @@ impl char {
} }
/// Checks if the value is an ASCII uppercase character: /// Checks if the value is an ASCII uppercase character:
/// U+0041 'A' ... U+005A 'Z'. /// U+0041 'A' ..= U+005A 'Z'.
/// ///
/// # Examples /// # Examples
/// ///
@@ -1107,7 +1107,7 @@ impl char {
} }
/// Checks if the value is an ASCII lowercase character: /// Checks if the value is an ASCII lowercase character:
/// U+0061 'a' ... U+007A 'z'. /// U+0061 'a' ..= U+007A 'z'.
/// ///
/// # Examples /// # Examples
/// ///
@@ -1140,9 +1140,9 @@ impl char {
/// Checks if the value is an ASCII alphanumeric character: /// Checks if the value is an ASCII alphanumeric character:
/// ///
/// - U+0041 'A' ... U+005A 'Z', or /// - U+0041 'A' ..= U+005A 'Z', or
/// - U+0061 'a' ... U+007A 'z', or /// - U+0061 'a' ..= U+007A 'z', or
/// - U+0030 '0' ... U+0039 '9'. /// - U+0030 '0' ..= U+0039 '9'.
/// ///
/// # Examples /// # Examples
/// ///
@@ -1174,7 +1174,7 @@ impl char {
} }
/// Checks if the value is an ASCII decimal digit: /// Checks if the value is an ASCII decimal digit:
/// U+0030 '0' ... U+0039 '9'. /// U+0030 '0' ..= U+0039 '9'.
/// ///
/// # Examples /// # Examples
/// ///
@@ -1207,9 +1207,9 @@ impl char {
/// Checks if the value is an ASCII hexadecimal digit: /// Checks if the value is an ASCII hexadecimal digit:
/// ///
/// - U+0030 '0' ... U+0039 '9', or /// - U+0030 '0' ..= U+0039 '9', or
/// - U+0041 'A' ... U+0046 'F', or /// - U+0041 'A' ..= U+0046 'F', or
/// - U+0061 'a' ... U+0066 'f'. /// - U+0061 'a' ..= U+0066 'f'.
/// ///
/// # Examples /// # Examples
/// ///
@@ -1242,10 +1242,10 @@ impl char {
/// Checks if the value is an ASCII punctuation character: /// Checks if the value is an ASCII punctuation character:
/// ///
/// - U+0021 ... U+002F `! " # $ % & ' ( ) * + , - . /`, or /// - U+0021 ..= U+002F `! " # $ % & ' ( ) * + , - . /`, or
/// - U+003A ... U+0040 `: ; < = > ? @`, or /// - U+003A ..= U+0040 `: ; < = > ? @`, or
/// - U+005B ... U+0060 ``[ \ ] ^ _ ` ``, or /// - U+005B ..= U+0060 ``[ \ ] ^ _ ` ``, or
/// - U+007B ... U+007E `{ | } ~` /// - U+007B ..= U+007E `{ | } ~`
/// ///
/// # Examples /// # Examples
/// ///
@@ -1277,7 +1277,7 @@ impl char {
} }
/// Checks if the value is an ASCII graphic character: /// Checks if the value is an ASCII graphic character:
/// U+0021 '!' ... U+007E '~'. /// U+0021 '!' ..= U+007E '~'.
/// ///
/// # Examples /// # Examples
/// ///
@@ -1358,7 +1358,7 @@ impl char {
} }
/// Checks if the value is an ASCII control character: /// Checks if the value is an ASCII control character:
/// U+0000 NUL ... U+001F UNIT SEPARATOR, or U+007F DELETE. /// U+0000 NUL ..= U+001F UNIT SEPARATOR, or U+007F DELETE.
/// Note that most ASCII whitespace characters are control /// Note that most ASCII whitespace characters are control
/// characters, but SPACE is not. /// characters, but SPACE is not.
/// ///

View File

@@ -4166,8 +4166,8 @@ impl u8 {
/// Checks if the value is an ASCII alphabetic character: /// Checks if the value is an ASCII alphabetic character:
/// ///
/// - U+0041 'A' ... U+005A 'Z', or /// - U+0041 'A' ..= U+005A 'Z', or
/// - U+0061 'a' ... U+007A 'z'. /// - U+0061 'a' ..= U+007A 'z'.
/// ///
/// # Examples /// # Examples
/// ///
@@ -4202,7 +4202,7 @@ impl u8 {
} }
/// Checks if the value is an ASCII uppercase character: /// Checks if the value is an ASCII uppercase character:
/// U+0041 'A' ... U+005A 'Z'. /// U+0041 'A' ..= U+005A 'Z'.
/// ///
/// # Examples /// # Examples
/// ///
@@ -4237,7 +4237,7 @@ impl u8 {
} }
/// Checks if the value is an ASCII lowercase character: /// Checks if the value is an ASCII lowercase character:
/// U+0061 'a' ... U+007A 'z'. /// U+0061 'a' ..= U+007A 'z'.
/// ///
/// # Examples /// # Examples
/// ///
@@ -4273,9 +4273,9 @@ impl u8 {
/// Checks if the value is an ASCII alphanumeric character: /// Checks if the value is an ASCII alphanumeric character:
/// ///
/// - U+0041 'A' ... U+005A 'Z', or /// - U+0041 'A' ..= U+005A 'Z', or
/// - U+0061 'a' ... U+007A 'z', or /// - U+0061 'a' ..= U+007A 'z', or
/// - U+0030 '0' ... U+0039 '9'. /// - U+0030 '0' ..= U+0039 '9'.
/// ///
/// # Examples /// # Examples
/// ///
@@ -4310,7 +4310,7 @@ impl u8 {
} }
/// Checks if the value is an ASCII decimal digit: /// Checks if the value is an ASCII decimal digit:
/// U+0030 '0' ... U+0039 '9'. /// U+0030 '0' ..= U+0039 '9'.
/// ///
/// # Examples /// # Examples
/// ///
@@ -4346,9 +4346,9 @@ impl u8 {
/// Checks if the value is an ASCII hexadecimal digit: /// Checks if the value is an ASCII hexadecimal digit:
/// ///
/// - U+0030 '0' ... U+0039 '9', or /// - U+0030 '0' ..= U+0039 '9', or
/// - U+0041 'A' ... U+0046 'F', or /// - U+0041 'A' ..= U+0046 'F', or
/// - U+0061 'a' ... U+0066 'f'. /// - U+0061 'a' ..= U+0066 'f'.
/// ///
/// # Examples /// # Examples
/// ///
@@ -4384,10 +4384,10 @@ impl u8 {
/// Checks if the value is an ASCII punctuation character: /// Checks if the value is an ASCII punctuation character:
/// ///
/// - U+0021 ... U+002F `! " # $ % & ' ( ) * + , - . /`, or /// - U+0021 ..= U+002F `! " # $ % & ' ( ) * + , - . /`, or
/// - U+003A ... U+0040 `: ; < = > ? @`, or /// - U+003A ..= U+0040 `: ; < = > ? @`, or
/// - U+005B ... U+0060 ``[ \ ] ^ _ ` ``, or /// - U+005B ..= U+0060 ``[ \ ] ^ _ ` ``, or
/// - U+007B ... U+007E `{ | } ~` /// - U+007B ..= U+007E `{ | } ~`
/// ///
/// # Examples /// # Examples
/// ///
@@ -4422,7 +4422,7 @@ impl u8 {
} }
/// Checks if the value is an ASCII graphic character: /// Checks if the value is an ASCII graphic character:
/// U+0021 '!' ... U+007E '~'. /// U+0021 '!' ..= U+007E '~'.
/// ///
/// # Examples /// # Examples
/// ///
@@ -4509,7 +4509,7 @@ impl u8 {
} }
/// Checks if the value is an ASCII control character: /// Checks if the value is an ASCII control character:
/// U+0000 NUL ... U+001F UNIT SEPARATOR, or U+007F DELETE. /// U+0000 NUL ..= U+001F UNIT SEPARATOR, or U+007F DELETE.
/// Note that most ASCII whitespace characters are control /// Note that most ASCII whitespace characters are control
/// characters, but SPACE is not. /// characters, but SPACE is not.
/// ///

View File

@@ -994,7 +994,7 @@ pub enum PatKind {
/// A literal. /// A literal.
Lit(P<Expr>), Lit(P<Expr>),
/// A range pattern (e.g., `1...2` or `1..2`). /// A range pattern (e.g., `1..=2` or `1..2`).
Range(P<Expr>, P<Expr>, RangeEnd), Range(P<Expr>, P<Expr>, RangeEnd),
/// `[a, b, ..i, y, z]` is represented as: /// `[a, b, ..i, y, z]` is represented as:

View File

@@ -428,7 +428,7 @@ enum Constructor<'tcx> {
Variant(DefId), Variant(DefId),
/// Literal values. /// Literal values.
ConstantValue(&'tcx ty::Const<'tcx>), ConstantValue(&'tcx ty::Const<'tcx>),
/// Ranges of literal values (`2...5` and `2..5`). /// Ranges of literal values (`2..=5` and `2..5`).
ConstantRange(u128, u128, Ty<'tcx>, RangeEnd), ConstantRange(u128, u128, Ty<'tcx>, RangeEnd),
/// Array patterns of length n. /// Array patterns of length n.
Slice(u64), Slice(u64),
@@ -816,7 +816,7 @@ fn max_slice_length<'p, 'a: 'p, 'tcx: 'a, I>(
/// `IntRange`s always store a contiguous range. This means that values are /// `IntRange`s always store a contiguous range. This means that values are
/// encoded such that `0` encodes the minimum value for the integer, /// encoded such that `0` encodes the minimum value for the integer,
/// regardless of the signedness. /// regardless of the signedness.
/// For example, the pattern `-128...127i8` is encoded as `0..=255`. /// For example, the pattern `-128..=127i8` is encoded as `0..=255`.
/// This makes comparisons and arithmetic on interval endpoints much more /// This makes comparisons and arithmetic on interval endpoints much more
/// straightforward. See `signed_bias` for details. /// straightforward. See `signed_bias` for details.
/// ///

View File

@@ -136,7 +136,7 @@ impl TargetDataLayout {
} }
if bits >= i128_align_src && bits <= 128 { if bits >= i128_align_src && bits <= 128 {
// Default alignment for i128 is decided by taking the alignment of // Default alignment for i128 is decided by taking the alignment of
// largest-sized i{64...128}. // largest-sized i{64..=128}.
i128_align_src = bits; i128_align_src = bits;
dl.i128_align = a; dl.i128_align = a;
} }

View File

@@ -1181,7 +1181,7 @@ pub enum ExprKind {
Field(P<Expr>, Ident), Field(P<Expr>, Ident),
/// An indexing operation (e.g., `foo[2]`). /// An indexing operation (e.g., `foo[2]`).
Index(P<Expr>, P<Expr>), Index(P<Expr>, P<Expr>),
/// A range (e.g., `1..2`, `1..`, `..2`, `1...2`, `1...`, `...2`). /// A range (e.g., `1..2`, `1..`, `..2`, `1..=2`, `..=2`).
Range(Option<P<Expr>>, Option<P<Expr>>, RangeLimits), Range(Option<P<Expr>>, Option<P<Expr>>, RangeLimits),
/// Variable reference, possibly containing `::` and/or type /// Variable reference, possibly containing `::` and/or type

View File

@@ -234,7 +234,7 @@ pub const PREC_RESET: i8 = -100;
pub const PREC_CLOSURE: i8 = -40; pub const PREC_CLOSURE: i8 = -40;
pub const PREC_JUMP: i8 = -30; pub const PREC_JUMP: i8 = -30;
pub const PREC_RANGE: i8 = -10; pub const PREC_RANGE: i8 = -10;
// The range 2 ... 14 is reserved for AssocOp binary operator precedences. // The range 2..=14 is reserved for AssocOp binary operator precedences.
pub const PREC_PREFIX: i8 = 50; pub const PREC_PREFIX: i8 = 50;
pub const PREC_POSTFIX: i8 = 60; pub const PREC_POSTFIX: i8 = 60;
pub const PREC_PAREN: i8 = 99; pub const PREC_PAREN: i8 = 99;