2 // compile-flags: --crate-type lib
4 // Regression test for ICE which occurred when const propagating an enum with three variants
5 // one of which is uninhabited.
9 pub struct TokioError {
22 impl IntoError<Error> for Api
24 type Source = ApiError;
25 fn into_error(self, error: Self::Source) -> Error {
27 source: (|v| v)(error),
32 pub trait IntoError<E>
34 /// The underlying error
37 /// Combine the information to produce the error
38 fn into_error(self, source: Self::Source) -> E;