File tree Expand file tree Collapse file tree 1 file changed +16
-0
lines changed Expand file tree Collapse file tree 1 file changed +16
-0
lines changed Original file line number Diff line number Diff line change @@ -24,6 +24,14 @@ declare_clippy_lint! {
2424 /// assert!(matches!(b'X', b'A'..=b'Z'));
2525 /// assert!(matches!('2', '0'..='9'));
2626 /// assert!(matches!('x', 'A'..='Z' | 'a'..='z'));
27+ ///
28+ /// assert!((b'0'..=b'9').contains(&b'0'));
29+ /// assert!((b'a'..=b'z').contains(&b'a'));
30+ /// assert!((b'A'..=b'Z').contains(&b'A'));
31+ ///
32+ /// assert!(('0'..='9').contains(&'0'));
33+ /// assert!(('a'..='z').contains(&'a'));
34+ /// assert!(('A'..='Z').contains(&'A'));
2735 /// }
2836 /// ```
2937 /// Use instead:
@@ -33,6 +41,14 @@ declare_clippy_lint! {
3341 /// assert!(b'X'.is_ascii_uppercase());
3442 /// assert!('2'.is_ascii_digit());
3543 /// assert!('x'.is_ascii_alphabetic());
44+ ///
45+ /// assert!(b'0'.is_ascii_digit());
46+ /// assert!(b'a'.is_ascii_lowercase());
47+ /// assert!(b'A'.is_ascii_uppercase());
48+ ///
49+ /// assert!('0'.is_ascii_digit());
50+ /// assert!('a'.is_ascii_lowercase());
51+ /// assert!('A'.is_ascii_uppercase());
3652 /// }
3753 /// ```
3854 #[ clippy:: version = "1.66.0" ]
You can’t perform that action at this time.
0 commit comments