]> git.lizzy.rs Git - rust.git/blob - src/tools/clippy/tests/ui/is_digit_ascii_radix.fixed
Rollup merge of #102412 - joboet:dont_panic, r=m-ou-se
[rust.git] / src / tools / clippy / tests / ui / is_digit_ascii_radix.fixed
1 // run-rustfix
2
3 #![warn(clippy::is_digit_ascii_radix)]
4
5 const TEN: u32 = 10;
6
7 fn main() {
8     let c: char = '6';
9
10     // Should trigger the lint.
11     let _ = c.is_ascii_digit();
12     let _ = c.is_ascii_hexdigit();
13     let _ = c.is_ascii_hexdigit();
14
15     // Should not trigger the lint.
16     let _ = c.is_digit(11);
17     let _ = c.is_digit(TEN);
18 }