diff options
| author | Dylan DPC <dylan.dpc@gmail.com> | 2021-02-23 02:51:51 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2021-02-23 02:51:51 +0100 |
| commit | b8d4354099a070fa34bdf373e0f2ae2e40797ee9 (patch) | |
| tree | f241ec15b23d05ba3d200f5cde4126fe44478a4e /library/std/src/ffi | |
| parent | cc07061190713059dc533f68a450799dbfb70c5e (diff) | |
| parent | 67fcaaaa7a9c393926e25db600a9976137425d68 (diff) | |
| download | rust-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/std/src/ffi')
| -rw-r--r-- | library/std/src/ffi/os_str.rs | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/library/std/src/ffi/os_str.rs b/library/std/src/ffi/os_str.rs index 5bb3f6bdcfd..272eccda894 100644 --- a/library/std/src/ffi/os_str.rs +++ b/library/std/src/ffi/os_str.rs @@ -71,6 +71,7 @@ use crate::sys_common::{AsInner, FromInner, IntoInner}; /// [`CStr`]: crate::ffi::CStr /// [conversions]: super#conversions #[derive(Clone)] +#[cfg_attr(not(test), rustc_diagnostic_item = "OsString")] #[stable(feature = "rust1", since = "1.0.0")] pub struct OsString { inner: Buf, @@ -93,6 +94,7 @@ impl crate::sealed::Sealed for OsString {} /// /// [`&str`]: str /// [conversions]: super#conversions +#[cfg_attr(not(test), rustc_diagnostic_item = "OsStr")] #[stable(feature = "rust1", since = "1.0.0")] // FIXME: // `OsStr::from_inner` current implementation relies |
