• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 // In expression position, but not statement position, when we expand a macro,
2 // we replace the span of the expanded expression with that of the call site.
3 
4 macro_rules! nested_expr {
5     () => (fake) //~ ERROR cannot find
6     //~^ ERROR cannot find
7 }
8 
9 macro_rules! call_nested_expr {
10     () => (nested_expr!())
11 }
12 
13 macro_rules! call_nested_expr_sum {
14     () => { 1 + nested_expr!(); }
15 }
16 
main()17 fn main() {
18     1 + call_nested_expr!();
19     call_nested_expr_sum!();
20 }
21