Rollup merge of #88216 - kornelski:from_layout_err, r=kennytm

Don't stabilize creation of TryReserveError instances

#48043 + https://github.com/rust-lang/rust/pull/87993#issuecomment-903189016
This commit is contained in:
Manish Goregaokar 2021-08-26 12:38:08 -07:00 committed by GitHub
commit cf5e362fd5
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

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
}
}