cgp_error_extra/impls/infallible.rs
1use core::convert::Infallible;
2
3use cgp_core::error::{ErrorRaiser, ErrorRaiserComponent, HasErrorType};
4use cgp_core::prelude::*;
5
6pub struct RaiseInfallible;
7
8#[cgp_provider(ErrorRaiserComponent)]
9impl<Context> ErrorRaiser<Context, Infallible> for RaiseInfallible
10where
11 Context: HasErrorType,
12{
13 fn raise_error(e: Infallible) -> Context::Error {
14 match e {}
15 }
16}