Skip to content
Closed
Changes from 2 commits
Commits
Show all changes
26 commits
Select commit Hold shift + click to select a range
492826a
Add a note about the panic behavior of math operations on time objects
poliorcetics Sep 5, 2020
a6ff925
Reduce boilerplate with the matches! macro
LingMan Sep 21, 2020
b4e77d2
rewrite old test so that its attributes are consistent with what we w…
pnkfelix Jun 15, 2020
9601724
Avoid unchecked casts in net parser
tamird Oct 4, 2020
f78a7ad
Inline "eof" methods
tamird Oct 4, 2020
afa2a67
Prevent forbid from being ignored if overriden at the same level.
pnkfelix Jun 15, 2020
5ab1967
Remove extra indirection in LitKind::ByteStr
rschoon Sep 17, 2020
62f7712
Change clippy's Constant back to refcount clone byte strings
rschoon Oct 4, 2020
b205436
Allow anyone to set regression labels
camelid Oct 4, 2020
afe83d4
Rename bootstrap/defaults/{config.toml.PROFILE => config.PROFILE.toml}
thomcc Oct 5, 2020
5388eb4
Add changelog entry mentioning the renamed profile files
thomcc Oct 5, 2020
daf48b8
inliner: use caller param_env
lcnr Oct 5, 2020
b1ce619
Add missing examples for MaybeUninit
GuillaumeGomez Sep 26, 2020
9704911
Use matches! for core::char methods
pickfire Oct 5, 2020
35192ff
Fix span for unicode escape suggestion.
ehuss Oct 5, 2020
7c2dd01
Rollup merge of #76388 - poliorcetics:system-time-document-panic, r=K…
jonas-schievink Oct 5, 2020
886e030
Rollup merge of #76995 - LingMan:middle_matches, r=varkor
jonas-schievink Oct 5, 2020
01d45ec
Rollup merge of #77228 - GuillaumeGomez:maybeuninit-examples, r=pickfire
jonas-schievink Oct 5, 2020
5b97a70
Rollup merge of #77528 - tamird:avoid-cast-net-parser, r=dtolnay
jonas-schievink Oct 5, 2020
8f33841
Rollup merge of #77534 - Mark-Simulacrum:issue-70819-disallow-overrid…
jonas-schievink Oct 5, 2020
2e185c7
Rollup merge of #77555 - camelid:patch-8, r=Mark-Simulacrum
jonas-schievink Oct 5, 2020
5b56541
Rollup merge of #77558 - thomcc:defaults-toml-extension, r=jyn514
jonas-schievink Oct 5, 2020
04d9ae4
Rollup merge of #77560 - rschoon:fix-litkind-rc-bytebuf, r=lcnr
jonas-schievink Oct 5, 2020
6d1cc0d
Rollup merge of #77568 - lcnr:mir-inline-def-id, r=ecstatic-morse
jonas-schievink Oct 5, 2020
6fbda95
Rollup merge of #77571 - pickfire:patch-6, r=cramertj
jonas-schievink Oct 5, 2020
7af4959
Rollup merge of #77587 - ehuss:unicode-escape-span, r=ecstatic-morse
jonas-schievink Oct 5, 2020
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
50 changes: 10 additions & 40 deletions library/core/src/char/methods.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1229,10 +1229,7 @@ impl char {
#[rustc_const_stable(feature = "const_ascii_ctype_on_intrinsics", since = "1.47.0")]
#[inline]
pub const fn is_ascii_alphabetic(&self) -> bool {
match *self {
'A'..='Z' | 'a'..='z' => true,
_ => false,
}
matches!(*self, 'A'..='Z' | 'a'..='z')
}

/// Checks if the value is an ASCII uppercase character:
Expand Down Expand Up @@ -1265,10 +1262,7 @@ impl char {
#[rustc_const_stable(feature = "const_ascii_ctype_on_intrinsics", since = "1.47.0")]
#[inline]
pub const fn is_ascii_uppercase(&self) -> bool {
match *self {
'A'..='Z' => true,
_ => false,
}
matches!(*self, 'A'..='Z')
}

/// Checks if the value is an ASCII lowercase character:
Expand Down Expand Up @@ -1301,10 +1295,7 @@ impl char {
#[rustc_const_stable(feature = "const_ascii_ctype_on_intrinsics", since = "1.47.0")]
#[inline]
pub const fn is_ascii_lowercase(&self) -> bool {
match *self {
'a'..='z' => true,
_ => false,
}
matches!(*self, 'a'..='z')
}

/// Checks if the value is an ASCII alphanumeric character:
Expand Down Expand Up @@ -1340,10 +1331,7 @@ impl char {
#[rustc_const_stable(feature = "const_ascii_ctype_on_intrinsics", since = "1.47.0")]
#[inline]
pub const fn is_ascii_alphanumeric(&self) -> bool {
match *self {
'0'..='9' | 'A'..='Z' | 'a'..='z' => true,
_ => false,
}
matches!(*self, '0'..='9' | 'A'..='Z' | 'a'..='z')
}

/// Checks if the value is an ASCII decimal digit:
Expand Down Expand Up @@ -1376,10 +1364,7 @@ impl char {
#[rustc_const_stable(feature = "const_ascii_ctype_on_intrinsics", since = "1.47.0")]
#[inline]
pub const fn is_ascii_digit(&self) -> bool {
match *self {
'0'..='9' => true,
_ => false,
}
matches!(*self, '0'..='9')
}

/// Checks if the value is an ASCII hexadecimal digit:
Expand Down Expand Up @@ -1415,10 +1400,7 @@ impl char {
#[rustc_const_stable(feature = "const_ascii_ctype_on_intrinsics", since = "1.47.0")]
#[inline]
pub const fn is_ascii_hexdigit(&self) -> bool {
match *self {
'0'..='9' | 'A'..='F' | 'a'..='f' => true,
_ => false,
}
matches!(*self, '0'..='9' | 'A'..='F' | 'a'..='f')
}

/// Checks if the value is an ASCII punctuation character:
Expand Down Expand Up @@ -1455,10 +1437,7 @@ impl char {
#[rustc_const_stable(feature = "const_ascii_ctype_on_intrinsics", since = "1.47.0")]
#[inline]
pub const fn is_ascii_punctuation(&self) -> bool {
match *self {
'!'..='/' | ':'..='@' | '['..='`' | '{'..='~' => true,
_ => false,
}
matches!(*self, '!'..='/' | ':'..='@' | '['..='`' | '{'..='~')
}

/// Checks if the value is an ASCII graphic character:
Expand Down Expand Up @@ -1491,10 +1470,7 @@ impl char {
#[rustc_const_stable(feature = "const_ascii_ctype_on_intrinsics", since = "1.47.0")]
#[inline]
pub const fn is_ascii_graphic(&self) -> bool {
match *self {
'!'..='~' => true,
_ => false,
}
matches!(*self, '!'..='~')
}

/// Checks if the value is an ASCII whitespace character:
Expand Down Expand Up @@ -1544,10 +1520,7 @@ impl char {
#[rustc_const_stable(feature = "const_ascii_ctype_on_intrinsics", since = "1.47.0")]
#[inline]
pub const fn is_ascii_whitespace(&self) -> bool {
match *self {
'\t' | '\n' | '\x0C' | '\r' | ' ' => true,
_ => false,
}
matches!(*self, '\t' | '\n' | '\x0C' | '\r' | ' ')
}

/// Checks if the value is an ASCII control character:
Expand Down Expand Up @@ -1582,10 +1555,7 @@ impl char {
#[rustc_const_stable(feature = "const_ascii_ctype_on_intrinsics", since = "1.47.0")]
#[inline]
pub const fn is_ascii_control(&self) -> bool {
match *self {
'\0'..='\x1F' | '\x7F' => true,
_ => false,
}
matches!(*self, '\0'..='\x1F' | '\x7F')
}
}

Expand Down