add missing typecheck for const pattern match arm

Issue #4968
auto merge of #5010 : youknowone/rust/match_const_typecheck, r=catamorphism

Fix of issue #4968