Conversation

Jarkko Sakkinen

Would make porting all sorts of old protocol stacks to #Rust so much easier if the enum fields could have aliased names. #rustlang
2
1
2
And also would probably help writing bindgen style utilities for Rust (less corner cases when porting from C).
0
0
0

@jarkko Would associated constant work for you?

impl Enum {
const FakeField: Self = Self::Variant;
}

syntactically works as Enum::FakeField.

1
0
3
@kornel Hmm, well it is not a bad workaround, thanks!
0
0
0