]> git.lizzy.rs Git - rust.git/commitdiff
Mark AsRef impls for String's Drain as stable.
authorMara Bos <m-ou.se@m-ou.se>
Wed, 9 Sep 2020 17:10:06 +0000 (19:10 +0200)
committerMara Bos <m-ou.se@m-ou.se>
Wed, 9 Sep 2020 17:10:06 +0000 (19:10 +0200)
Trait implementations effectively can't be #[unstable].

library/alloc/src/string.rs

index a164de8b4d3875b1fc344c0834b47b24dbf92822..047ae942cd9a25f5aa0f504aef9d4e9bf7209d4a 100644 (file)
@@ -2481,14 +2481,14 @@ pub fn as_str(&self) -> &str {
     }
 }
 
-#[unstable(feature = "string_drain_as_str", issue = "none")]
+#[stable(feature = "string_drain_as_ref", since = "1.48.0")]
 impl<'a> AsRef<str> for Drain<'a> {
     fn as_ref(&self) -> &str {
         self.as_str()
     }
 }
 
-#[unstable(feature = "string_drain_as_str", issue = "none")]
+#[stable(feature = "string_drain_as_ref", since = "1.48.0")]
 impl<'a> AsRef<[u8]> for Drain<'a> {
     fn as_ref(&self) -> &[u8] {
         self.as_str().as_bytes()