diff options
| author | Nicholas Nethercote <n.nethercote@gmail.com> | 2023-12-06 20:36:44 +1100 |
|---|---|---|
| committer | Nicholas Nethercote <n.nethercote@gmail.com> | 2023-12-07 07:33:12 +1100 |
| commit | 856b55fb34050a56f4ce2a5e171d8a7dca19729c (patch) | |
| tree | cfd054aab60b2991f040f10b9881df167cf2d8cb | |
| parent | 7a34091eed9adcb079035357ffaf2467b0d377fc (diff) | |
| download | rust-856b55fb34050a56f4ce2a5e171d8a7dca19729c.tar.gz rust-856b55fb34050a56f4ce2a5e171d8a7dca19729c.zip | |
De-pub some functions.
| -rw-r--r-- | compiler/rustc_lexer/src/unescape.rs | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/compiler/rustc_lexer/src/unescape.rs b/compiler/rustc_lexer/src/unescape.rs index 717b042fbda..d98a702427e 100644 --- a/compiler/rustc_lexer/src/unescape.rs +++ b/compiler/rustc_lexer/src/unescape.rs @@ -167,7 +167,7 @@ impl Mode { } /// Non-byte literals should have `\xXX` escapes that are within the ASCII range. - pub fn ascii_escapes_should_be_ascii(self) -> bool { + fn ascii_escapes_should_be_ascii(self) -> bool { match self { Mode::Char | Mode::Str | Mode::RawStr => true, Mode::Byte | Mode::ByteStr | Mode::RawByteStr | Mode::CStr | Mode::RawCStr => false, @@ -175,7 +175,7 @@ impl Mode { } /// Whether characters within the literal must be within the ASCII range - pub fn characters_should_be_ascii(self) -> bool { + fn characters_should_be_ascii(self) -> bool { match self { Mode::Byte | Mode::ByteStr | Mode::RawByteStr => true, Mode::Char | Mode::Str | Mode::RawStr | Mode::CStr | Mode::RawCStr => false, @@ -183,7 +183,7 @@ impl Mode { } /// Byte literals do not allow unicode escape. - pub fn is_unicode_escape_disallowed(self) -> bool { + fn is_unicode_escape_disallowed(self) -> bool { match self { Mode::Byte | Mode::ByteStr | Mode::RawByteStr => true, Mode::Char | Mode::Str | Mode::RawStr | Mode::CStr | Mode::RawCStr => false, |
