Skip to content
Myr

Restore compatibility with rustc pre-1.38

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 62673e2 · Browse files · 1 file+1 added−1 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+1 added−1 removed

  • other:+1 added−1 removed

1 file+1 added−1 removed

modified:src/error.rs+1 added-1 removed
728 unmodified lines
729// Reads the vtable out of `p`. This is the same as `p.as_ref().vtable`, but730// avoids converting `p` into a reference.731unsafe fn vtable(p: NonNull<ErrorImpl>) -> &'static ErrorVTable {732 // NOTE: This assumes that `ErrorVTable` is the first field of ErrorImpl.733 *p.as_ptr().cast::<&'static ErrorVTable>()733 *(p.as_ptr() as *const &'static ErrorVTable)734}735736// repr C to ensure that ContextError<C, E> has the same layout as737// ContextError<ManuallyDrop<C>, E> and ContextError<C, ManuallyDrop<E>>.
114 unmodified lines