1 // Be smart about span of parenthesized expression in macro. 2 3 macro_rules! paren { 4 ($e:expr) => (($e)) 5 // ^^^^ do not highlight here 6 } 7 8 mod m { 9 pub struct S { 10 x: i32 11 } make() -> S12 pub fn make() -> S { 13 S { x: 0 } 14 } 15 } 16 main()17fn main() { 18 let s = m::make(); 19 paren!(s.x); //~ ERROR field `x` of struct `S` is private 20 // ^^^ highlight here 21 } 22