1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29
fn main() { #[cfg(debug_assertions)] { println!("DEBUG"); } } fn main() { #[cfg(feature = "foo")] { /* let foo = 0 */ } } fn main() { #[cfg(feature = "foo")] { /* let foo = 0; */ } } fn main() { #[foo] #[bar] #[baz] { // let foo = 0; } }