Do not rely on newtype enum dereference
auto merge of #7560 : sanxiyn/rust/newtype-enum, r=cmr

See #7552.