about summary refs log tree commit diff
path: root/library/alloc/src/string.rs
diff options
context:
space:
mode:
authorDylan DPC <dylan.dpc@gmail.com>2021-02-23 02:51:51 +0100
committerGitHub <noreply@github.com>2021-02-23 02:51:51 +0100
commitb8d4354099a070fa34bdf373e0f2ae2e40797ee9 (patch)
treef241ec15b23d05ba3d200f5cde4126fe44478a4e /library/alloc/src/string.rs
parentcc07061190713059dc533f68a450799dbfb70c5e (diff)
parent67fcaaaa7a9c393926e25db600a9976137425d68 (diff)
downloadrust-b8d4354099a070fa34bdf373e0f2ae2e40797ee9.tar.gz
rust-b8d4354099a070fa34bdf373e0f2ae2e40797ee9.zip
Rollup merge of #82128 - anall:feature/add_diagnostic_items, r=davidtwco
add diagnostic items for OsString/PathBuf/Owned as well as to_vec on slice

This is adding diagnostic items to be used by rust-lang/rust-clippy#6730, but my understanding is the clippy-side change does need to be done over there since I am adding a new clippy feature.

Add diagnostic items to the following types:
  OsString (os_string_type)
  PathBuf (path_buf_type)
  Owned (to_owned_trait)

As well as the to_vec method on slice/[T]
Diffstat (limited to 'library/alloc/src/string.rs')
-rw-r--r--library/alloc/src/string.rs1
1 files changed, 1 insertions, 0 deletions
diff --git a/library/alloc/src/string.rs b/library/alloc/src/string.rs
index b4deedc5263..6fb3fcbb63b 100644
--- a/library/alloc/src/string.rs
+++ b/library/alloc/src/string.rs
@@ -2175,6 +2175,7 @@ impl FromStr for String {
 /// implementation for free.
 ///
 /// [`Display`]: fmt::Display
+#[cfg_attr(not(test), rustc_diagnostic_item = "ToString")]
 #[stable(feature = "rust1", since = "1.0.0")]
 pub trait ToString {
     /// Converts the given value to a `String`.