We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
single_char_add_str
format_push_string
1 parent b2dc66e commit 6906fa9Copy full SHA for 6906fa9
alloc/src/string.rs
@@ -1113,6 +1113,7 @@ impl String {
1113
#[inline]
1114
#[stable(feature = "rust1", since = "1.0.0")]
1115
#[rustc_confusables("append", "push")]
1116
+ #[cfg_attr(not(test), rustc_diagnostic_item = "string_push_str")]
1117
pub fn push_str(&mut self, string: &str) {
1118
self.vec.extend_from_slice(string.as_bytes())
1119
}
@@ -1747,6 +1748,7 @@ impl String {
1747
1748
#[cfg(not(no_global_oom_handling))]
1749
1750
#[stable(feature = "insert_str", since = "1.16.0")]
1751
+ #[cfg_attr(not(test), rustc_diagnostic_item = "string_insert_str")]
1752
pub fn insert_str(&mut self, idx: usize, string: &str) {
1753
assert!(self.is_char_boundary(idx));
1754
0 commit comments