Don't stabilize creation of TryReserveError instances

This commit is contained in:
Kornel 2021-08-21 23:40:02 +01:00
parent b1928aa3b4
commit f1e860757e

View file

@ -117,12 +117,12 @@ impl From<TryReserveErrorKind> for TryReserveError {
}
}
#[unstable(feature = "try_reserve", reason = "new API", issue = "48043")]
impl From<LayoutError> for TryReserveError {
#[unstable(feature = "try_reserve_kind", reason = "new API", issue = "48043")]
impl From<LayoutError> for TryReserveErrorKind {
/// Always evaluates to [`TryReserveErrorKind::CapacityOverflow`].
#[inline]
fn from(_: LayoutError) -> Self {
TryReserveErrorKind::CapacityOverflow.into()
TryReserveErrorKind::CapacityOverflow
}
}