diff options
Diffstat (limited to 'src/liballoc')
| -rw-r--r-- | src/liballoc/slice.rs | 1 | ||||
| -rw-r--r-- | src/liballoc/string.rs | 1 |
2 files changed, 2 insertions, 0 deletions
diff --git a/src/liballoc/slice.rs b/src/liballoc/slice.rs index 28caccbc87f..2c7bdc427ea 100644 --- a/src/liballoc/slice.rs +++ b/src/liballoc/slice.rs @@ -1624,6 +1624,7 @@ impl<T> [T] { /// let x = s.to_vec(); /// // Here, `s` and `x` can be modified independently. /// ``` + #[rustc_conversion_suggestion] #[stable(feature = "rust1", since = "1.0.0")] #[inline] pub fn to_vec(&self) -> Vec<T> diff --git a/src/liballoc/string.rs b/src/liballoc/string.rs index ca493ab27e3..8d99d0bc8f4 100644 --- a/src/liballoc/string.rs +++ b/src/liballoc/string.rs @@ -2034,6 +2034,7 @@ pub trait ToString { /// /// assert_eq!(five, i.to_string()); /// ``` + #[rustc_conversion_suggestion] #[stable(feature = "rust1", since = "1.0.0")] fn to_string(&self) -> String; } |
