]> git.lizzy.rs Git - rust.git/blob - tests/ui/is_digit_ascii_radix.rs
Auto merge of #9684 - kraktus:ref_option_ref, r=xFrednet
[rust.git] / tests / ui / is_digit_ascii_radix.rs
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_digit(10);
12     let _ = c.is_digit(16);
13     let _ = c.is_digit(0x10);
14
15     // Should not trigger the lint.
16     let _ = c.is_digit(11);
17     let _ = c.is_digit(TEN);
18 }