Remove a couple of #[doc(hidden)] pub fn and their #[feature] gates

This commit is contained in:
Tobias Bucher
2023-01-10 15:59:47 +01:00
parent e7acd078f4
commit 77c85e9cba
11 changed files with 54 additions and 138 deletions

View File

@@ -131,7 +131,8 @@ pub struct TryFromSliceError(());
impl fmt::Display for TryFromSliceError {
#[inline]
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
fmt::Display::fmt(self.__description(), f)
#[allow(deprecated)]
self.description().fmt(f)
}
}
@@ -139,20 +140,6 @@ impl fmt::Display for TryFromSliceError {
impl Error for TryFromSliceError {
#[allow(deprecated)]
fn description(&self) -> &str {
self.__description()
}
}
impl TryFromSliceError {
#[unstable(
feature = "array_error_internals",
reason = "available through Error trait and this method should not \
be exposed publicly",
issue = "none"
)]
#[inline]
#[doc(hidden)]
pub fn __description(&self) -> &str {
"could not convert slice to array"
}
}