search

Home  >  Q&A  >  body text

linux - Rust: 测试时使用条件编译,如何在默认时开启某个测试而在传入 feature 后关闭?

ringa_leeringa_lee2797 days ago871

reply all(1)I'll reply

  • PHP中文网

    PHP中文网2017-04-17 16:18:42

    #![cfg(not(feature = "foo_feature"))]

    参见

    https://doc.rust-lang.org/ref...

    https://github.com/search?utf...

    reply
    0
  • Cancelreply