diff options
| author | Mara Bos <m-ou.se@m-ou.se> | 2020-09-09 19:10:06 +0200 |
|---|---|---|
| committer | Mara Bos <m-ou.se@m-ou.se> | 2020-09-09 19:10:06 +0200 |
| commit | f2a32909e0649eb589406ddac63597ba34273c95 (patch) | |
| tree | 9afa398f93d7e7fb19c557c56be2d6ef6e6f9ce7 /library/alloc/src/string.rs | |
| parent | f5bb523e94b431c35b495b6ad6ae94495b653a5f (diff) | |
| download | rust-f2a32909e0649eb589406ddac63597ba34273c95.tar.gz rust-f2a32909e0649eb589406ddac63597ba34273c95.zip | |
Mark AsRef impls for String's Drain as stable.
Trait implementations effectively can't be #[unstable].
Diffstat (limited to 'library/alloc/src/string.rs')
| -rw-r--r-- | library/alloc/src/string.rs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/library/alloc/src/string.rs b/library/alloc/src/string.rs index a164de8b4d3..047ae942cd9 100644 --- a/library/alloc/src/string.rs +++ b/library/alloc/src/string.rs @@ -2481,14 +2481,14 @@ impl<'a> Drain<'a> { } } -#[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() |
