-
Notifications
You must be signed in to change notification settings - Fork 1.6k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
handle macros returning Strings in single_char_push_str and single_ch…
…ar_insert_str
- Loading branch information
1 parent
eefeb4c
commit e82a280
Showing
7 changed files
with
54 additions
and
14 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,40 +1,46 @@ | ||
error: calling `insert_str()` using a single-character string literal | ||
--> $DIR/single_char_insert_str.rs:6:5 | ||
--> $DIR/single_char_insert_str.rs:12:5 | ||
| | ||
LL | string.insert_str(0, "R"); | ||
| ^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using `insert` with a character literal: `string.insert(0, 'R')` | ||
| | ||
= note: `-D clippy::single-char-insert-str` implied by `-D warnings` | ||
|
||
error: calling `insert_str()` using a single-character string literal | ||
--> $DIR/single_char_insert_str.rs:7:5 | ||
--> $DIR/single_char_insert_str.rs:13:5 | ||
| | ||
LL | string.insert_str(1, "'"); | ||
| ^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using `insert` with a character literal: `string.insert(1, '/'')` | ||
|
||
error: calling `insert_str()` using a single-character string literal | ||
--> $DIR/single_char_insert_str.rs:12:5 | ||
--> $DIR/single_char_insert_str.rs:18:5 | ||
| | ||
LL | string.insert_str(0, "/x52"); | ||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using `insert` with a character literal: `string.insert(0, '/x52')` | ||
|
||
error: calling `insert_str()` using a single-character string literal | ||
--> $DIR/single_char_insert_str.rs:13:5 | ||
--> $DIR/single_char_insert_str.rs:19:5 | ||
| | ||
LL | string.insert_str(0, "/u{0052}"); | ||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using `insert` with a character literal: `string.insert(0, '/u{0052}')` | ||
|
||
error: calling `insert_str()` using a single-character string literal | ||
--> $DIR/single_char_insert_str.rs:15:5 | ||
--> $DIR/single_char_insert_str.rs:21:5 | ||
| | ||
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 | ||
--> $DIR/single_char_insert_str.rs:17:5 | ||
--> $DIR/single_char_insert_str.rs:23:5 | ||
| | ||
LL | string.insert_str(Y, r##"a"##); | ||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using `insert` with a character literal: `string.insert(Y, 'a')` | ||
|
||
error: aborting due to 6 previous errors | ||
error: calling `insert_str()` using a single-character string literal | ||
--> $DIR/single_char_insert_str.rs:25:5 | ||
| | ||
LL | get_string!().insert_str(1, "?"); | ||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using `insert` with a character literal: `get_string!().insert(1, '?')` | ||
|
||
error: aborting due to 7 previous errors | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters