Skip to content

Commit 17c9a22

Browse files
authored
Rollup merge of #89141 - mbartlett21:patch-2, r=kennytm
Impl `Error` for `FromSecsError` without foreign type Using it through the crate-local path in `std` means that it shouldn't make an "Implementations on Foreign Types" section in the `std::error::Error` docs.
2 parents 8d95bb2 + e4faf17 commit 17c9a22

File tree

2 files changed

+5
-1
lines changed

2 files changed

+5
-1
lines changed

library/std/src/error.rs

+2-1
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@ use crate::num;
3131
use crate::str;
3232
use crate::string;
3333
use crate::sync::Arc;
34+
use crate::time;
3435

3536
/// `Error` is a trait representing the basic expectations for error values,
3637
/// i.e., values of type `E` in [`Result<T, E>`].
@@ -598,7 +599,7 @@ impl Error for char::ParseCharError {
598599
impl Error for alloc::collections::TryReserveError {}
599600

600601
#[unstable(feature = "duration_checked_float", issue = "83400")]
601-
impl Error for core::time::FromSecsError {}
602+
impl Error for time::FromSecsError {}
602603

603604
// Copied from `any.rs`.
604605
impl dyn Error + 'static {

library/std/src/time.rs

+3
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,9 @@ use crate::sys_common::FromInner;
4444
#[stable(feature = "time", since = "1.3.0")]
4545
pub use core::time::Duration;
4646

47+
#[unstable(feature = "duration_checked_float", issue = "83400")]
48+
pub use core::time::FromSecsError;
49+
4750
/// A measurement of a monotonically nondecreasing clock.
4851
/// Opaque and useful only with [`Duration`].
4952
///

0 commit comments

Comments
 (0)