Remove codes related to modes
auto merge of #6207 : sanxiyn/rust/tc-big, r=thestinger