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:
Dylan DPC 2020-02-22 18:42:59 +05:30 committed by GitHub
commit c261ff1a77
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 8 additions and 1 deletions

View file

@ -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);
}