diff options
| author | Ralf Jung <post@ralfj.de> | 2023-02-09 10:01:43 +0100 |
|---|---|---|
| committer | Ralf Jung <post@ralfj.de> | 2023-02-09 10:01:43 +0100 |
| commit | 6f451fca0dc7f9ab9f341fb529f861fafd205b2f (patch) | |
| tree | b8308e42c6a378ff7d5a4978cc3cfb5a7a34dc25 /library/alloc/src | |
| parent | 185156280f8e952a864c5f4f4c4daa03bc04d46c (diff) | |
| parent | 77c85e9cba0c3f8b185c63f013cca1350b2e5492 (diff) | |
Merge from rustc
Diffstat (limited to 'library/alloc/src')
| -rw-r--r-- | library/alloc/src/ffi/c_str.rs | 8 | ||||
| -rw-r--r-- | library/alloc/src/lib.rs | 1 | ||||
| -rw-r--r-- | library/alloc/src/string.rs | 4 |
3 files changed, 3 insertions, 10 deletions
diff --git a/library/alloc/src/ffi/c_str.rs b/library/alloc/src/ffi/c_str.rs index 11bd4c4dc1b..f99395c72aa 100644 --- a/library/alloc/src/ffi/c_str.rs +++ b/library/alloc/src/ffi/c_str.rs @@ -991,12 +991,6 @@ impl IntoStringError { pub fn utf8_error(&self) -> Utf8Error { self.error } - - #[doc(hidden)] - #[unstable(feature = "cstr_internals", issue = "none")] - pub fn __source(&self) -> &Utf8Error { - &self.error - } } impl IntoStringError { @@ -1141,6 +1135,6 @@ impl core::error::Error for IntoStringError { } fn source(&self) -> Option<&(dyn core::error::Error + 'static)> { - Some(self.__source()) + Some(&self.error) } } diff --git a/library/alloc/src/lib.rs b/library/alloc/src/lib.rs index 76dabfb429d..e9cc3875f68 100644 --- a/library/alloc/src/lib.rs +++ b/library/alloc/src/lib.rs @@ -116,7 +116,6 @@ #![feature(const_eval_select)] #![feature(const_pin)] #![feature(const_waker)] -#![feature(cstr_from_bytes_until_nul)] #![feature(dispatch_from_dyn)] #![feature(error_generic_member_access)] #![feature(error_in_core)] diff --git a/library/alloc/src/string.rs b/library/alloc/src/string.rs index ca182c8109e..75659188515 100644 --- a/library/alloc/src/string.rs +++ b/library/alloc/src/string.rs @@ -928,12 +928,12 @@ impl String { /// Copies elements from `src` range to the end of the string. /// - /// ## Panics + /// # Panics /// /// Panics if the starting point or end point do not lie on a [`char`] /// boundary, or if they're out of bounds. /// - /// ## Examples + /// # Examples /// /// ``` /// #![feature(string_extend_from_within)] |
