]> git.lizzy.rs Git - rust.git/blob - tests/ui/single_char_push_str.fixed
get_hint_if_single_char_arg: fix bug where multi-char letters are not detected properly
[rust.git] / tests / ui / single_char_push_str.fixed
1 // run-rustfix
2 #![warn(clippy::single_char_push_str)]
3
4 macro_rules! get_string {
5     () => {
6         String::from("Hello world!")
7     };
8 }
9
10 fn main() {
11     let mut string = String::new();
12     string.push('R');
13     string.push('\'');
14
15     string.push('u');
16     string.push_str("st");
17     string.push_str("");
18     string.push('\x52');
19     string.push('\u{0052}');
20     string.push('a');
21
22     get_string!().push('รถ');
23 }