Activate checking code for ASM feature gate. Fix tests
auto merge of #10009 : LeoTestard/rust/asm-feature-gated, r=huonw

Suite of #9991