Skip to content

Commit

Permalink
Fix typo coersion -> coercion
Browse files Browse the repository at this point in the history
  • Loading branch information
dtolnay committed Oct 15, 2020
1 parent 840afd8 commit fd0268b
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/error.rs
Original file line number Diff line number Diff line change
Expand Up @@ -193,7 +193,7 @@ impl Error {
_object: error,
});
// Erase the concrete type of E from the compile-time type system. This
// is equivalent to the safe unsize coersion from Box<ErrorImpl<E>> to
// is equivalent to the safe unsize coercion from Box<ErrorImpl<E>> to
// Box<ErrorImpl<dyn StdError + Send + Sync + 'static>> except that the
// result is a thin pointer. The necessary behavior for manipulating the
// underlying ErrorImpl<E> is preserved in the vtable provided by the
Expand Down Expand Up @@ -690,7 +690,7 @@ impl<E> ErrorImpl<E> {
fn erase(&self) -> &ErrorImpl<()> {
// Erase the concrete type of E but preserve the vtable in self.vtable
// for manipulating the resulting thin pointer. This is analogous to an
// unsize coersion.
// unsize coercion.
unsafe { &*(self as *const ErrorImpl<E> as *const ErrorImpl<()>) }
}
}
Expand Down

0 comments on commit fd0268b

Please sign in to comment.