add diagnostic items
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]
This commit is contained in:
parent
b86674e7cc
commit
5ef202520f
5 changed files with 8 additions and 0 deletions
|
@ -796,6 +796,7 @@ symbols! {
|
||||||
options,
|
options,
|
||||||
or,
|
or,
|
||||||
or_patterns,
|
or_patterns,
|
||||||
|
os_string_type,
|
||||||
other,
|
other,
|
||||||
out,
|
out,
|
||||||
overlapping_marker_traits,
|
overlapping_marker_traits,
|
||||||
|
@ -824,6 +825,7 @@ symbols! {
|
||||||
pat2018,
|
pat2018,
|
||||||
pat2021,
|
pat2021,
|
||||||
path,
|
path,
|
||||||
|
path_buf_type,
|
||||||
pattern_parentheses,
|
pattern_parentheses,
|
||||||
phantom_data,
|
phantom_data,
|
||||||
pin,
|
pin,
|
||||||
|
@ -1084,6 +1086,7 @@ symbols! {
|
||||||
slice,
|
slice,
|
||||||
slice_alloc,
|
slice_alloc,
|
||||||
slice_patterns,
|
slice_patterns,
|
||||||
|
slice_to_vec_method,
|
||||||
slice_u8,
|
slice_u8,
|
||||||
slice_u8_alloc,
|
slice_u8_alloc,
|
||||||
slicing_syntax,
|
slicing_syntax,
|
||||||
|
@ -1159,6 +1162,7 @@ symbols! {
|
||||||
then_with,
|
then_with,
|
||||||
thread,
|
thread,
|
||||||
thread_local,
|
thread_local,
|
||||||
|
to_owned_trait,
|
||||||
tool_attributes,
|
tool_attributes,
|
||||||
tool_lints,
|
tool_lints,
|
||||||
trace_macros,
|
trace_macros,
|
||||||
|
|
|
@ -32,6 +32,7 @@ where
|
||||||
/// to `T`. The `ToOwned` trait generalizes `Clone` to construct owned data
|
/// to `T`. The `ToOwned` trait generalizes `Clone` to construct owned data
|
||||||
/// from any borrow of a given type.
|
/// from any borrow of a given type.
|
||||||
#[stable(feature = "rust1", since = "1.0.0")]
|
#[stable(feature = "rust1", since = "1.0.0")]
|
||||||
|
#[cfg_attr(not(test), rustc_diagnostic_item = "to_owned_trait")]
|
||||||
pub trait ToOwned {
|
pub trait ToOwned {
|
||||||
/// The resulting type after obtaining ownership.
|
/// The resulting type after obtaining ownership.
|
||||||
#[stable(feature = "rust1", since = "1.0.0")]
|
#[stable(feature = "rust1", since = "1.0.0")]
|
||||||
|
|
|
@ -442,6 +442,7 @@ impl<T> [T] {
|
||||||
/// // Here, `s` and `x` can be modified independently.
|
/// // Here, `s` and `x` can be modified independently.
|
||||||
/// ```
|
/// ```
|
||||||
#[rustc_conversion_suggestion]
|
#[rustc_conversion_suggestion]
|
||||||
|
#[rustc_diagnostic_item = "slice_to_vec_method"]
|
||||||
#[stable(feature = "rust1", since = "1.0.0")]
|
#[stable(feature = "rust1", since = "1.0.0")]
|
||||||
#[inline]
|
#[inline]
|
||||||
pub fn to_vec(&self) -> Vec<T>
|
pub fn to_vec(&self) -> Vec<T>
|
||||||
|
|
|
@ -71,6 +71,7 @@ use crate::sys_common::{AsInner, FromInner, IntoInner};
|
||||||
/// [`CStr`]: crate::ffi::CStr
|
/// [`CStr`]: crate::ffi::CStr
|
||||||
/// [conversions]: super#conversions
|
/// [conversions]: super#conversions
|
||||||
#[derive(Clone)]
|
#[derive(Clone)]
|
||||||
|
#[cfg_attr(not(test), rustc_diagnostic_item = "os_string_type")]
|
||||||
#[stable(feature = "rust1", since = "1.0.0")]
|
#[stable(feature = "rust1", since = "1.0.0")]
|
||||||
pub struct OsString {
|
pub struct OsString {
|
||||||
inner: Buf,
|
inner: Buf,
|
||||||
|
|
|
@ -1066,6 +1066,7 @@ impl FusedIterator for Ancestors<'_> {}
|
||||||
///
|
///
|
||||||
/// Which method works best depends on what kind of situation you're in.
|
/// Which method works best depends on what kind of situation you're in.
|
||||||
#[derive(Clone)]
|
#[derive(Clone)]
|
||||||
|
#[cfg_attr(not(test), rustc_diagnostic_item = "path_buf_type")]
|
||||||
#[stable(feature = "rust1", since = "1.0.0")]
|
#[stable(feature = "rust1", since = "1.0.0")]
|
||||||
// FIXME:
|
// FIXME:
|
||||||
// `PathBuf::as_mut_vec` current implementation relies
|
// `PathBuf::as_mut_vec` current implementation relies
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue