8000 Fix inconsistent highlight blocks. by tomasz-rozanski · Pull Request #62951 · rust-lang/rust · GitHub
[go: up one dir, main page]

Skip to content

Fix inconsistent highlight blocks. #62951

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 4 commits into from
Closed
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Further refine highlight fix.
  • Loading branch information
tomasz-rozanski committed Jul 25, 2019
commit ab2ff17b0bad3a9409b51c2c1ed44abe183b5e64
2 changes: 1 addition & 1 deletion src/libcore/char/convert.rs
Original file line number Diff line number Diff line change
Expand Up @@ -247,7 +247,7 @@ impl fmt::Display for CharTryFromError {

/// Converts a digit in the given radix to a `char`.
///
/// A `radix` here is sometimes also called a `base`. A radix of two
/// A 'radix' here is sometimes also called a 'base'. A radix of two
/// indicates a binary number, a radix of ten, decimal, and a radix of
/// sixteen, hexadecimal, to give some common values. Arbitrary
/// radices are supported.
Expand Down
64 changes: 32 additions & 32 deletions src/libcore/char/methods.rs
Original file line number Diff line number Diff line change
Expand Up @@ -11,21 +11,21 @@ use super::*;
impl char {
/// Checks if a `char` is a digit in the given radix.
///
/// A `radix` here is sometimes also called a `base`. A radix of two
/// A 'radix' here is sometimes also called a 'base'. A radix of two
/// indicates a binary number, a radix of ten, decimal, and a radix of
/// sixteen, hexadecimal, to give some common values. Arbitrary
/// radices are supported.
///
/// Compared to `is_numeric()`, this function only recognizes the characters
/// `0-9`, `a-z` and `A-Z`.
///
/// `Digit` is defined to be only the following characters:
/// 'Digit' is defined to be only the following characters:
///
/// * `0-9`
/// * `a-z`
/// * `A-Z`
///
/// For a more comprehensive understanding of `digit`, see [`is_numeric`][is_numeric].
/// For a more comprehensive understanding of 'digit', see [`is_numeric`][is_numeric].
///
/// [is_numeric]: #method.is_numeric
///
Expand Down Expand Up @@ -63,12 +63,12 @@ impl char {

/// Converts a `char` to a digit in the given radix.
///
/// A `radix` here is sometimes also called a `base`. A radix of two
/// A 'radix' here is sometimes also called a 'base'. A radix of two
/// indicates a binary number, a radix of ten, decimal, and a radix of
/// sixteen, hexadecimal, to give some common values. Arbitrary
/// radices are supported.
///
/// `Digit` is defined to be only the following characters:
/// 'Digit' is defined to be only the following characters:
///
/// * `0-9`
/// * `a-z`
Expand Down Expand Up @@ -405,7 +405,7 @@ impl char {
///
/// # Examples
///
/// In both of these examples, `ß` takes two bytes to encode.
/// In both of these examples, 'ß' takes two bytes to encode.
///
/// ```
/// let mut b = [0; 2];
Expand Down Expand Up @@ -475,7 +475,7 @@ impl char {
///
/// # Examples
///
/// In both of these examples, `𝕊` takes two `u16`s to encode.
/// In both of these examples, '𝕊' takes two `u16`s to encode.
///
/// ```
/// let mut b = [0; 2];
Expand Down Expand Up @@ -582,7 +582,7 @@ impl char {

/// Returns `true` if this `char` is lowercase.
///
/// `Lowercase` is defined according to the terms of the Unicode Derived Core
/// 'Lowercase' is defined according to the terms of the Unicode Derived Core
/// Property `Lowercase`.
///
/// # Examples
Expand Down Expand Up @@ -610,7 +610,7 @@ impl char {

/// Returns `true` if this `char` is uppercase.
///
/// `Uppercase` is defined according to the terms of the Unicode Derived Core
/// 'Uppercase' is defined according to the terms of the Unicode Derived Core
/// Property `Uppercase`.
///
/// # Examples
Expand Down Expand Up @@ -638,7 +638,7 @@ impl char {

/// Returns `true` if this `char` is whitespace.
///
/// `Whitespace` is defined according to the terms of the Unicode Derived Core
/// 'Whitespace' is defined according to the terms of the Unicode Derived Core
/// Property `White_Space`.
///
/// # Examples
Expand All @@ -665,7 +665,7 @@ impl char {

/// Returns `true` if this `char` is alphanumeric.
///
/// `Alphanumeric`-ness is defined in terms of the Unicode General Categories
/// 'Alphanumeric'-ness is defined in terms of the Unicode General Categories
/// `Nd`, `Nl`, `No` and the Derived Core Property `Alphabetic`.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Keep

///
/// # Examples
Expand Down Expand Up @@ -719,7 +719,7 @@ impl char {

/// Returns `true` if this `char` is numeric.
///
/// `Numeric`-ness is defined in terms of the Unicode General Categories
/// 'Numeric'-ness is defined in terms of the Unicode General Categories
/// `Nd`, `Nl`, `No`.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Keep

///
/// # Examples
Expand Down Expand Up @@ -865,12 +865,12 @@ impl char {
///
/// # Note on locale
///
/// In Turkish, the equivalent of `i` in Latin has five forms instead of two:
/// In Turkish, the equivalent of 'i' in Latin has five forms instead of two:
///
EDBE /// * `Dotless`: I / ı, sometimes written ï
/// * `Dotted`: İ / i
/// * 'Dotless': I / ı, sometimes written ï
/// * 'Dotted': İ / i
///
/// Note that the lowercase dotted `i` is the same as the Latin. Therefore:
/// Note that the lowercase dotted 'i' is the same as the Latin. Therefore:
///
/// ```
/// let upper_i = 'i'.to_uppercase().to_string();
Expand Down Expand Up @@ -912,7 +912,7 @@ impl char {

/// Makes a copy of the value in its ASCII upper case equivalent.
///
/// ASCII letters `a` to `z` are mapped to `A` to `Z`,
/// ASCII letters 'a' to 'z' are mapped to 'A' to 'Z',
/// but non-ASCII letters are unchanged.
///
/// To uppercase the value in-place, use [`make_ascii_uppercase`].
Expand Down Expand Up @@ -944,7 +944,7 @@ impl char {

/// Makes a copy of the value in its ASCII lower case equivalent.
///
/// ASCII letters `A` to `Z` are mapped to `a` to `z`,
/// ASCII letters 'A' to 'Z' are mapped to 'a' to 'z',
/// but non-ASCII letters are unchanged.
///
/// To lowercase the value in-place, use [`make_ascii_lowercase`].
Expand Down Expand Up @@ -997,7 +997,7 @@ impl char {

/// Converts this type to its ASCII upper case equivalent in-place.
///
/// ASCII letters `a` to `z` are mapped to `A` to `Z`,
/// ASCII letters 'a' to 'z' are mapped to 'A' to 'Z',
/// but non-ASCII letters are unchanged.
///
/// To return a new uppercased value without modifying the existing one, use
Expand All @@ -1022,7 +1022,7 @@ impl char {

/// Converts this type to its ASCII lower case equivalent in-place.
///
/// ASCII letters `A` to `Z` are mapped to `a` to `z`,
/// ASCII letters 'A' to 'Z' are mapped to 'a' to 'z',
/// but non-ASCII letters are unchanged.
///
/// To return a new lowercased value without modifying the existing one, use
Expand All @@ -1047,8 +1047,8 @@ impl char {

/// Checks if the value is an ASCII alphabetic character:
///
/// - U+0041 `A` ..= U+005A `Z`, or
/// - U+0061 `a` ..= U+007A `z`.
/// - U+0041 'A' ..= U+005A 'Z', or
/// - U+0061 'a' ..= U+007A 'z'.
///
/// # Examples
///
Expand Down Expand Up @@ -1080,7 +1080,7 @@ impl char {
}

/// Checks if the value is an ASCII uppercase character:
/// U+0041 `A` ..= U+005A `Z`.
/// U+0041 'A' ..= U+005A 'Z'.
///
/// # Examples
///
Expand Down Expand Up @@ -1112,7 +1112,7 @@ impl char {
}

/// Checks if the value is an ASCII lowercase character:
/// U+0061 `a` ..= U+007A `z`.
/// U+0061 'a' ..= U+007A 'z'.
///
/// # Examples
///
Expand Down Expand Up @@ -1145,9 +1145,9 @@ impl char {

/// Checks if the value is an ASCII alphanumeric character:
///
/// - U+0041 `A` ..= U+005A `Z`, or
/// - U+0061 `a` ..= U+007A `z`, or
/// - U+0030 `0` ..= U+0039 `9`.
/// - U+0041 'A' ..= U+005A 'Z', or
/// - U+0061 'a' ..= U+007A 'z', or
/// - U+0030 '0' ..= U+0039 '9'.
///
/// # Examples
///
Expand Down Expand Up @@ -1179,7 +1179,7 @@ impl char {
}

/// Checks if the value is an ASCII decimal digit:
/// U+0030 `0` ..= U+0039 `9`.
/// U+0030 '0' ..= U+0039 '9'.
///
/// # Examples
///
Expand Down Expand Up @@ -1212,9 +1212,9 @@ impl char {

/// Checks if the value is an ASCII hexadecimal digit:
///
/// - U+0030 `0` ..= U+0039 `9`, or
/// - U+0041 `A` ..= U+0046 `F`, or
/// - U+0061 `a` ..= U+0066 `f`.
/// - U+0030 '0' ..= U+0039 '9', or
/// - U+0041 'A' ..= U+0046 'F', or
/// - U+0061 'a' ..= U+0066 'f'.
///
/// # Examples
///
Expand Down Expand Up @@ -1282,7 +1282,7 @@ impl char {
}

/// Checks if the value is an ASCII graphic character:
/// U+0021 `!` ..= U+007E `~`.
/// U+0021 '!' ..= U+007E '~'.
///
/// # Examples
///
Expand Down
6 changes: 3 additions & 3 deletions src/libcore/char/mod.rs
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
//! A character type.
//!
//! The `char` type represents a single character. More specifically, since
//! `character` isn't a well-defined concept in Unicode, `char` is a [Unicode
//! scalar value], which is similar to, but not the same as, a [Unicode code
//! point].
//! 'character' isn't a well-defined concept in Unicode, `char` is a '[Unicode
//! scalar value]', which is similar to, but not the same as, a '[Unicode code
//! point]'.
//!
//! [Unicode scalar value]: http://www.unicode.org/glossary/#unicode_scalar_value
//! [Unicode code point]: http://www.unicode.org/glossary/#code_point
Expand Down
0