Skip to content
This repository has been archived by the owner on Aug 16, 2021. It is now read-only.

Conditionnal compilation #53

Closed
Yamakaky opened this issue Nov 4, 2016 · 0 comments
Closed

Conditionnal compilation #53

Yamakaky opened this issue Nov 4, 2016 · 0 comments

Comments

@Yamakaky
Copy link
Contributor

Yamakaky commented Nov 4, 2016

It would be cool to support things like this (pseudo-code):

mod pote {
    error_chain! {
        errors {
            #[cfg(unix)]
            Unix {
            }
            #[cfg(not(unix))]
            Other {
            }
        }
    }
}

Currently, it works partially: the ErrorKind variant is generated correctly, but the matches always use the variants. Places which should be modified:

  • impl Debug for ErrorKind
  • impl Display for ErrorKind
  • ErrorKind::description
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant