diff --git a/crates/napi/src/error.rs b/crates/napi/src/error.rs index c530e925..ec368b0a 100644 --- a/crates/napi/src/error.rs +++ b/crates/napi/src/error.rs @@ -34,6 +34,12 @@ unsafe impl Sync for Error {} impl error::Error for Error {} +impl From for Error { + fn from(_: std::convert::Infallible) -> Self { + unreachable!() + } +} + #[cfg(feature = "serde-json")] impl ser::Error for Error { fn custom(msg: T) -> Self {