据我对the Rust documentation的最佳理解,属性仅应用于直接在属性之后的行。因此,例如我想conditionally compile行我可以这样做:
#[cfg(target_family = "unix")]
use termion::{color, style};
当我想有条件地编译两行时会发生什么?
#[cfg(target_family = "unix")]
use termion::{color, style};
#[cfg(target_family = "unix")]
use termion::screen::*;
是否有更清洁的方法?