3 #![allow(unused_must_use)]
5 use std::collections::HashSet;
15 // Not yet testing for multi-byte characters
16 // Changing `r.len() == 1` to `r.chars().count() == 1` in `lint_clippy::single_char_pattern`
17 // should have done this but produced an ICE
19 // We may not want to suggest changing these anyway
20 // See: https://github.com/rust-lang/rust-clippy/issues/650#issuecomment-184328984
24 // Can't use this lint for unicode code points which don't fit in a char
32 x.split_terminator('x');
33 x.rsplit_terminator('x');
39 x.rmatch_indices('x');
40 x.trim_start_matches('x');
41 x.trim_end_matches('x');
42 // Make sure we escape characters correctly.
47 let h = HashSet::<String>::new();
48 h.contains("X"); // should not warn
50 x.replace(";", ",").split(','); // issue #2978
51 x.starts_with('\x03'); // issue #2996