1 // Macros in statement vs expression position handle backtraces differently.
3 macro_rules! fake_method_stmt {
5 1.fake() //~ ERROR no method
9 macro_rules! fake_field_stmt {
11 1.fake //~ ERROR doesn't have fields
15 macro_rules! fake_anon_field_stmt {
17 (1).0 //~ ERROR doesn't have fields
21 macro_rules! fake_method_expr {
23 1.fake() //~ ERROR no method
27 macro_rules! fake_field_expr {
29 1.fake //~ ERROR doesn't have fields
33 macro_rules! fake_anon_field_expr {
35 (1).0 //~ ERROR doesn't have fields
39 macro_rules! real_method_stmt {
41 2.0.neg() //~ ERROR can't call method `neg` on ambiguous numeric type `{float}`
45 macro_rules! real_method_expr {
47 2.0.neg() //~ ERROR can't call method `neg` on ambiguous numeric type `{float}`
54 fake_anon_field_stmt!();
57 let _ = fake_method_expr!();
58 let _ = fake_field_expr!();
59 let _ = fake_anon_field_expr!();
60 let _ = real_method_expr!();