gcc/testsuite/rust/compile/macros/mbe/macro-issue1233.rs
raw| 1 | // { dg-additional-options "-frust-cfg=A -w" } |
| 2 | |
| 3 | macro_rules! impl_uint { |
| 4 | ($($ty:ident = $lang:literal),*) => { |
| 5 | $( |
| 6 | impl $ty { |
| 7 | pub fn to_le(self) -> Self { |
| 8 | #[cfg(not(A))] |
| 9 | { |
| 10 | self |
| 11 | } |
| 12 | #[cfg(A)] |
| 13 | { |
| 14 | self |
| 15 | } |
| 16 | } |
| 17 | } |
| 18 | )* |
| 19 | } |
| 20 | } |
| 21 | |
| 22 | impl_uint!(u8 = "u8", u16 = "u16", u32 = "u32"); |