1 #![feature(tool_lints)]
3 use std::collections::HashSet;
13 // Not yet testing for multi-byte characters
14 // Changing `r.len() == 1` to `r.chars().count() == 1` in `lint_clippy::single_char_pattern`
15 // should have done this but produced an ICE
17 // We may not want to suggest changing these anyway
18 // See: https://github.com/rust-lang-nursery/rust-clippy/issues/650#issuecomment-184328984
22 // Can't use this lint for unicode code points which don't fit in a char
30 x.split_terminator("x");
31 x.rsplit_terminator("x");
37 x.rmatch_indices("x");
38 x.trim_left_matches("x");
39 x.trim_right_matches("x");
40 // Make sure we escape characters correctly.
43 let h = HashSet::<String>::new();
44 h.contains("X"); // should not warn
46 x.replace(";", ",").split(","); // issue #2978
47 x.starts_with("\x03"); // issue #2996