opened
abonander
username_0
C-like enums with an explicit `#[repr(<int type>)]` attribute can be cast to that integer type, but there's no easy way to convert back:

```rust
#[repr(i16)]
enum MyEnum {
    Foo = 1,
    Bar = 2,
}

let val = MyEnum::Bar as i16;
let my_enum: MyEnum = // convert `val` back to `MyEnum`
```

This derive exists in [`enum-utils`](https://docs.rs/enum-utils/0.1.2/enum_utils/derive.TryFromRepr.html) but it would be nice not to have to reach for multiple crates.
Derive `TryFrom<T>` for enums marked `#[repr(T)]`
issue