2020-11-05 07:29:48 -06:00
|
|
|
error: calling `push_str()` using a single-character string literal
|
2024-02-17 06:16:29 -06:00
|
|
|
--> tests/ui/single_char_add_str.rs:14:5
|
2020-11-05 07:29:48 -06:00
|
|
|
|
|
|
|
|
LL | string.push_str("R");
|
|
|
|
| ^^^^^^^^^^^^^^^^^^^^ help: consider using `push` with a character literal: `string.push('R')`
|
|
|
|
|
|
|
|
|
= note: `-D clippy::single-char-add-str` implied by `-D warnings`
|
2023-08-01 07:02:21 -05:00
|
|
|
= help: to override `-D warnings` add `#[allow(clippy::single_char_add_str)]`
|
2020-11-05 07:29:48 -06:00
|
|
|
|
|
|
|
error: calling `push_str()` using a single-character string literal
|
2024-02-17 06:16:29 -06:00
|
|
|
--> tests/ui/single_char_add_str.rs:15:5
|
2020-11-05 07:29:48 -06:00
|
|
|
|
|
|
|
|
LL | string.push_str("'");
|
2023-08-24 14:32:12 -05:00
|
|
|
| ^^^^^^^^^^^^^^^^^^^^ help: consider using `push` with a character literal: `string.push('\'')`
|
2020-11-05 07:29:48 -06:00
|
|
|
|
|
|
|
error: calling `push_str()` using a single-character string literal
|
2024-02-17 06:16:29 -06:00
|
|
|
--> tests/ui/single_char_add_str.rs:20:5
|
2020-11-05 07:29:48 -06:00
|
|
|
|
|
2023-08-24 14:32:12 -05:00
|
|
|
LL | string.push_str("\x52");
|
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^ help: consider using `push` with a character literal: `string.push('\x52')`
|
2020-11-05 07:29:48 -06:00
|
|
|
|
|
|
|
error: calling `push_str()` using a single-character string literal
|
2024-02-17 06:16:29 -06:00
|
|
|
--> tests/ui/single_char_add_str.rs:21:5
|
2020-11-05 07:29:48 -06:00
|
|
|
|
|
2023-08-24 14:32:12 -05:00
|
|
|
LL | string.push_str("\u{0052}");
|
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using `push` with a character literal: `string.push('\u{0052}')`
|
2020-11-05 07:29:48 -06:00
|
|
|
|
|
|
|
error: calling `push_str()` using a single-character string literal
|
2024-02-17 06:16:29 -06:00
|
|
|
--> tests/ui/single_char_add_str.rs:22:5
|
2020-11-05 07:29:48 -06:00
|
|
|
|
|
|
|
|
LL | string.push_str(r##"a"##);
|
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using `push` with a character literal: `string.push('a')`
|
|
|
|
|
2024-06-09 13:01:00 -05:00
|
|
|
error: calling `push_str()` using a single-character converted to string
|
|
|
|
--> tests/ui/single_char_add_str.rs:25:5
|
|
|
|
|
|
|
|
|
LL | string.push_str(&c_ref.to_string());
|
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using `push` without `to_string()`: `string.push(*c_ref)`
|
|
|
|
|
|
|
|
error: calling `push_str()` using a single-character converted to string
|
|
|
|
--> tests/ui/single_char_add_str.rs:27:5
|
|
|
|
|
|
|
|
|
LL | string.push_str(&c.to_string());
|
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using `push` without `to_string()`: `string.push(c)`
|
|
|
|
|
|
|
|
error: calling `push_str()` using a single-character converted to string
|
|
|
|
--> tests/ui/single_char_add_str.rs:28:5
|
|
|
|
|
|
|
|
|
LL | string.push_str(&'a'.to_string());
|
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using `push` without `to_string()`: `string.push('a')`
|
|
|
|
|
2020-11-05 07:29:48 -06:00
|
|
|
error: calling `push_str()` using a single-character string literal
|
2024-06-09 13:01:00 -05:00
|
|
|
--> tests/ui/single_char_add_str.rs:30:5
|
2020-11-05 07:29:48 -06:00
|
|
|
|
|
|
|
|
LL | get_string!().push_str("ö");
|
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using `push` with a character literal: `get_string!().push('ö')`
|
|
|
|
|
|
|
|
error: calling `insert_str()` using a single-character string literal
|
2024-06-09 13:01:00 -05:00
|
|
|
--> tests/ui/single_char_add_str.rs:35:5
|
2020-11-05 07:29:48 -06:00
|
|
|
|
|
|
|
|
LL | string.insert_str(0, "R");
|
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using `insert` with a character literal: `string.insert(0, 'R')`
|
|
|
|
|
|
|
|
error: calling `insert_str()` using a single-character string literal
|
2024-06-09 13:01:00 -05:00
|
|
|
--> tests/ui/single_char_add_str.rs:36:5
|
2020-11-05 07:29:48 -06:00
|
|
|
|
|
|
|
|
LL | string.insert_str(1, "'");
|
2023-08-24 14:32:12 -05:00
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using `insert` with a character literal: `string.insert(1, '\'')`
|
2020-11-05 07:29:48 -06:00
|
|
|
|
|
|
|
error: calling `insert_str()` using a single-character string literal
|
2024-06-09 13:01:00 -05:00
|
|
|
--> tests/ui/single_char_add_str.rs:41:5
|
2020-11-05 07:29:48 -06:00
|
|
|
|
|
2023-08-24 14:32:12 -05:00
|
|
|
LL | string.insert_str(0, "\x52");
|
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using `insert` with a character literal: `string.insert(0, '\x52')`
|
2020-11-05 07:29:48 -06:00
|
|
|
|
|
|
|
error: calling `insert_str()` using a single-character string literal
|
2024-06-09 13:01:00 -05:00
|
|
|
--> tests/ui/single_char_add_str.rs:42:5
|
2020-11-05 07:29:48 -06:00
|
|
|
|
|
2023-08-24 14:32:12 -05:00
|
|
|
LL | string.insert_str(0, "\u{0052}");
|
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using `insert` with a character literal: `string.insert(0, '\u{0052}')`
|
2020-11-05 07:29:48 -06:00
|
|
|
|
|
|
|
error: calling `insert_str()` using a single-character string literal
|
2024-06-09 13:01:00 -05:00
|
|
|
--> tests/ui/single_char_add_str.rs:44:5
|
2020-11-05 07:29:48 -06:00
|
|
|
|
|
|
|
|
LL | string.insert_str(x, r##"a"##);
|
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using `insert` with a character literal: `string.insert(x, 'a')`
|
|
|
|
|
|
|
|
error: calling `insert_str()` using a single-character string literal
|
2024-06-09 13:01:00 -05:00
|
|
|
--> tests/ui/single_char_add_str.rs:46:5
|
2020-11-05 07:29:48 -06:00
|
|
|
|
|
|
|
|
LL | string.insert_str(Y, r##"a"##);
|
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using `insert` with a character literal: `string.insert(Y, 'a')`
|
|
|
|
|
|
|
|
error: calling `insert_str()` using a single-character string literal
|
2024-06-09 13:01:00 -05:00
|
|
|
--> tests/ui/single_char_add_str.rs:47:5
|
2020-11-05 07:29:48 -06:00
|
|
|
|
|
|
|
|
LL | string.insert_str(Y, r##"""##);
|
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using `insert` with a character literal: `string.insert(Y, '"')`
|
|
|
|
|
|
|
|
error: calling `insert_str()` using a single-character string literal
|
2024-06-09 13:01:00 -05:00
|
|
|
--> tests/ui/single_char_add_str.rs:48:5
|
2020-11-05 07:29:48 -06:00
|
|
|
|
|
|
|
|
LL | string.insert_str(Y, r##"'"##);
|
2023-08-24 14:32:12 -05:00
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using `insert` with a character literal: `string.insert(Y, '\'')`
|
2020-11-05 07:29:48 -06:00
|
|
|
|
2024-06-09 13:01:00 -05:00
|
|
|
error: calling `insert_str()` using a single-character converted to string
|
|
|
|
--> tests/ui/single_char_add_str.rs:50:5
|
|
|
|
|
|
|
|
|
LL | string.insert_str(0, &c_ref.to_string());
|
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using `insert` without `to_string()`: `string.insert(0, *c_ref)`
|
|
|
|
|
|
|
|
error: calling `insert_str()` using a single-character converted to string
|
|
|
|
--> tests/ui/single_char_add_str.rs:51:5
|
|
|
|
|
|
|
|
|
LL | string.insert_str(0, &c.to_string());
|
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using `insert` without `to_string()`: `string.insert(0, c)`
|
|
|
|
|
|
|
|
error: calling `insert_str()` using a single-character converted to string
|
|
|
|
--> tests/ui/single_char_add_str.rs:52:5
|
|
|
|
|
|
|
|
|
LL | string.insert_str(0, &'a'.to_string());
|
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using `insert` without `to_string()`: `string.insert(0, 'a')`
|
|
|
|
|
2020-11-05 07:29:48 -06:00
|
|
|
error: calling `insert_str()` using a single-character string literal
|
2024-06-09 13:01:00 -05:00
|
|
|
--> tests/ui/single_char_add_str.rs:54:5
|
2020-11-05 07:29:48 -06:00
|
|
|
|
|
|
|
|
LL | get_string!().insert_str(1, "?");
|
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using `insert` with a character literal: `get_string!().insert(1, '?')`
|
|
|
|
|
2024-06-09 13:01:00 -05:00
|
|
|
error: aborting due to 21 previous errors
|
2020-11-05 07:29:48 -06:00
|
|
|
|