Skip to content
Myr

Unconditionally store Option<Backtrace>

Before adoption: this commit came in with the history the project adopted, so no landing records it.

authored by David Tolnay · committed by David Tolnay · parent a2d7e2f · Browse files · 1 file+0 added−5 removed
This commit

State

Before adoption: this commit came in with the history the project adopted, so no landing records it.

Diff stats

1 file+0 added−5 removed

  • other:+0 added−5 removed

1 file+0 added−5 removed

modified:src/error.rs-5 removed
58 unmodified lines
59 fn construct<E>(error: E, type_id: TypeId, backtrace: Option<Backtrace>) -> Self60 where61 E: StdError + Send + Sync + 'static,62 {63 #[cfg(not(backtrace))]64 let _ = backtrace;6563 unsafe {64 let obj = mem::transmute::<&dyn StdError, TraitObject>(&error);65 let inner = Box::new(ErrorImpl {66 vtable: obj.vtable,67 type_id,71 #[cfg(backtrace)]68 backtrace,69 error,70 });71 Error {
180 unmodified lines
252#[repr(C)]253struct ErrorImpl<E> {254 vtable: *const (),255 type_id: TypeId,260 #[cfg(backtrace)]256 backtrace: Option<Backtrace>,257 error: E,258}259
118 unmodified lines