Allow constant c-like enum to integral/float cast
auto merge of #5182 : youknowone/rust/enum-cast, r=brson

Fix #4926