Skip to content
This repository has been archived by the owner on Mar 1, 2019. It is now read-only.

ICE with complex custom derive #83

Open
nrc opened this issue Aug 10, 2017 · 0 comments
Open

ICE with complex custom derive #83

nrc opened this issue Aug 10, 2017 · 0 comments
Labels

Comments

@nrc
Copy link
Member

nrc commented Aug 10, 2017

See https://github.com/DanielKeep/rust-conv/blob/master/src/errors.rs#L227-L256

custom_derive!{
    /**
    A general error enumeration that subsumes all other conversion errors.
    This exists primarily as a "catch-all" for reliably unifying various different kinds of conversion errors.
    */
    #[derive(
        Copy, Clone, Eq, PartialEq, Ord, PartialOrd,
        IntoInner, DummyDebug, FromNoError,
        EnumDesc(
            NegOverflow => "conversion resulted in negative overflow",
            PosOverflow => "conversion resulted in positive overflow",
            Unrepresentable => "could not convert unrepresentable value",
        ),
        FromName(Unrepresentable),
        FromName(NegOverflow),
        FromName(PosOverflow),
        FromRemap(RangeError(NegOverflow, PosOverflow))
    )]
    pub enum GeneralError<T> {
        /// Input was too negative for the target type.
        NegOverflow(T),

        /// Input was too positive for the target type.
        PosOverflow(T),

        /// Input was not representable in the target type.
        Unrepresentable(T),
    }
}

I think the ICE is happening when compiling the conv crate

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

1 participant