Skip to content

Commit

Permalink
Fix implementation for no-std, stable-toolchain builds
Browse files Browse the repository at this point in the history
  • Loading branch information
TimDiekmann committed Jan 3, 2023
1 parent 0441439 commit 07968da
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions packages/libs/error-stack/src/report.rs
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@ use tracing_error::{SpanTrace, SpanTraceStatus};
#[cfg(nightly)]
use crate::iter::{RequestRef, RequestValue};
use crate::{
error::ReportError,
iter::{Frames, FramesMut},
Context, Frame,
};
Expand Down Expand Up @@ -650,7 +649,7 @@ impl<C> Report<C> {
where
C: 'static,
{
ReportError::new(self)
crate::error::ReportError::new(self)
}

/// Returns this `Report` as an [`Error`].
Expand All @@ -660,28 +659,32 @@ impl<C> Report<C> {
where
C: 'static,
{
ReportError::from_ref(self)
crate::error::ReportError::from_ref(self)
}
}

#[cfg(any(nightly, feature = "std"))]
impl<C: 'static> From<Report<C>> for Box<dyn Error> {
fn from(report: Report<C>) -> Self {
Box::new(report.into_error())
}
}

#[cfg(any(nightly, feature = "std"))]
impl<C: 'static> From<Report<C>> for Box<dyn Error + Send> {
fn from(report: Report<C>) -> Self {
Box::new(report.into_error())
}
}

#[cfg(any(nightly, feature = "std"))]
impl<C: 'static> From<Report<C>> for Box<dyn Error + Sync> {
fn from(report: Report<C>) -> Self {
Box::new(report.into_error())
}
}

#[cfg(any(nightly, feature = "std"))]
impl<C: 'static> From<Report<C>> for Box<dyn Error + Send + Sync> {
fn from(report: Report<C>) -> Self {
Box::new(report.into_error())
Expand Down

0 comments on commit 07968da

Please sign in to comment.