Remove legacy_modes from test cases
auto merge of #5092 : brson/rust/legacy, r=brson