Skip to content

Commit 6906fa9

Browse files
committed
[Clippy] Swap single_char_add_str/format_push_string to use diagnostic items instead of paths
1 parent b2dc66e commit 6906fa9

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

alloc/src/string.rs

+2
Original file line numberDiff line numberDiff line change
@@ -1113,6 +1113,7 @@ impl String {
11131113
#[inline]
11141114
#[stable(feature = "rust1", since = "1.0.0")]
11151115
#[rustc_confusables("append", "push")]
1116+
#[cfg_attr(not(test), rustc_diagnostic_item = "string_push_str")]
11161117
pub fn push_str(&mut self, string: &str) {
11171118
self.vec.extend_from_slice(string.as_bytes())
11181119
}
@@ -1747,6 +1748,7 @@ impl String {
17471748
#[cfg(not(no_global_oom_handling))]
17481749
#[inline]
17491750
#[stable(feature = "insert_str", since = "1.16.0")]
1751+
#[cfg_attr(not(test), rustc_diagnostic_item = "string_insert_str")]
17501752
pub fn insert_str(&mut self, idx: usize, string: &str) {
17511753
assert!(self.is_char_boundary(idx));
17521754

0 commit comments

Comments
 (0)