mirror of
https://github.com/rust-lang/rust-clippy
synced 2024-11-15 17:28:07 +00:00
34 lines
1.4 KiB
Text
34 lines
1.4 KiB
Text
error: calling `push_str()` using a single-character string literal
|
|
--> $DIR/single_char_push_str.rs:6:5
|
|
|
|
|
LL | string.push_str("R");
|
|
| ^^^^^^^^^^^^^^^^^^^^ help: consider using `push` with a character literal: `string.push('R')`
|
|
|
|
|
= note: `-D clippy::single-char-push-str` implied by `-D warnings`
|
|
|
|
error: calling `push_str()` using a single-character string literal
|
|
--> $DIR/single_char_push_str.rs:7:5
|
|
|
|
|
LL | string.push_str("'");
|
|
| ^^^^^^^^^^^^^^^^^^^^ help: consider using `push` with a character literal: `string.push('/'')`
|
|
|
|
error: calling `push_str()` using a single-character string literal
|
|
--> $DIR/single_char_push_str.rs:12:5
|
|
|
|
|
LL | string.push_str("/x52");
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^ help: consider using `push` with a character literal: `string.push('/x52')`
|
|
|
|
error: calling `push_str()` using a single-character string literal
|
|
--> $DIR/single_char_push_str.rs:13:5
|
|
|
|
|
LL | string.push_str("/u{0052}");
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using `push` with a character literal: `string.push('/u{0052}')`
|
|
|
|
error: calling `push_str()` using a single-character string literal
|
|
--> $DIR/single_char_push_str.rs:14:5
|
|
|
|
|
LL | string.push_str(r##"a"##);
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using `push` with a character literal: `string.push('a')`
|
|
|
|
error: aborting due to 5 previous errors
|
|
|