Rollup merge of #68984 - ecstatic-morse:const-u8-is-ascii, r=sfackler
Make `u8::is_ascii` a stable `const fn` `char::is_ascii` was already stabilized as `const fn` in #55278, so there is no reason for `u8::is_ascii` to go through an unstable period. cc @rust-lang/libs
This commit is contained in:
commit
c261ff1a77
2 changed files with 8 additions and 1 deletions
|
|
@ -3,7 +3,13 @@
|
|||
static X: bool = 'a'.is_ascii();
|
||||
static Y: bool = 'ä'.is_ascii();
|
||||
|
||||
static BX: bool = b'a'.is_ascii();
|
||||
static BY: bool = 192u8.is_ascii();
|
||||
|
||||
fn main() {
|
||||
assert!(X);
|
||||
assert!(!Y);
|
||||
|
||||
assert!(BX);
|
||||
assert!(!BY);
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue