Closed
Description
I tried this code:
#![deny(clippy::missing_const_for_fn)]
/*
error: this could be a `const fn`
*/
fn is_ascii_digit(byte: u8) -> bool {
byte.is_ascii_digit()
}
/*
error: `core::num::<impl u8>::is_ascii_digit` is not yet stable as a const fn
*/
// const fn is_ascii_digit(byte: u8) -> bool {
// byte.is_ascii_digit()
// }
fn main() {
dbg!(is_ascii_digit(b'1'));
}
Meta
cargo clippy -V
: clippy 0.0.212 (04488af 2020-08-24)rustc -Vv
:rustc 1.46.0 (04488afe3 2020-08-24) binary: rustc commit-hash: 04488afe34512aa4c33566eb16d8c912a3ae04f9 commit-date: 2020-08-24 host: x86_64-unknown-linux-gnu release: 1.46.0 LLVM version: 10.0