4 #![allow(unused_variables)]
5 #![deny(non_snake_case)]
6 #![feature(stmt_expr_attributes)]
31 // pretty printer bug...
35 let () = (#[cfg(unset)] 341,); // Should this also work on parens?
36 let t = (1, #[cfg(unset)] 3, 4);
37 assert_eq!(t, (1, 4));
39 let f = |_: u32, _: u32| ();
40 f(2, 1, #[cfg(unset)] 6);
42 let _: u32 = a.clone(#[cfg(unset)] undefined);
44 let _: [(); 0] = [#[cfg(unset)] 126];
45 let t = [#[cfg(unset)] 1, 2, 6];
46 assert_eq!(t, [2, 6]);
57 // check that macro expanded code works
60 ($cfg:meta? $ib:block else $eb:block) => {
72 let n = if_cfg!(unset? {
78 assert_eq!((#[cfg(unset)] 1, #[cfg(not(unset))] 2), (2,));
81 // check that lints work
83 #[allow(non_snake_case)]
88 #[allow(non_snake_case)]