diff options
| author | GnomedDev <david2005thomas@gmail.com> | 2024-09-18 21:37:12 +0100 |
|---|---|---|
| committer | GnomedDev <david2005thomas@gmail.com> | 2024-09-19 13:13:20 +0100 |
| commit | 28f4c8293aa79989251d7035d312d13c8f374054 (patch) | |
| tree | 754a451621e7c1abc919aa820118766323234fc3 /library | |
| parent | 037b9784b68f7e11a05a722b6aa6c768484dec40 (diff) | |
| download | rust-28f4c8293aa79989251d7035d312d13c8f374054.tar.gz rust-28f4c8293aa79989251d7035d312d13c8f374054.zip | |
[Clippy] Swap `single_char_add_str`/`format_push_string` to use diagnostic items instead of paths
Diffstat (limited to 'library')
| -rw-r--r-- | library/alloc/src/string.rs | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/library/alloc/src/string.rs b/library/alloc/src/string.rs index a2c70de3ed0..c7e9931ed2a 100644 --- a/library/alloc/src/string.rs +++ b/library/alloc/src/string.rs @@ -1113,6 +1113,7 @@ impl String { #[inline] #[stable(feature = "rust1", since = "1.0.0")] #[rustc_confusables("append", "push")] + #[cfg_attr(not(test), rustc_diagnostic_item = "string_push_str")] pub fn push_str(&mut self, string: &str) { self.vec.extend_from_slice(string.as_bytes()) } @@ -1747,6 +1748,7 @@ impl String { #[cfg(not(no_global_oom_handling))] #[inline] #[stable(feature = "insert_str", since = "1.16.0")] + #[cfg_attr(not(test), rustc_diagnostic_item = "string_insert_str")] pub fn insert_str(&mut self, idx: usize, string: &str) { assert!(self.is_char_boundary(idx)); |
