File tree 1 file changed +8
-0
lines changed
1 file changed +8
-0
lines changed Original file line number Diff line number Diff line change @@ -1095,6 +1095,9 @@ fn get_string_representation(expr: &ast::Expr) -> Option<String> {
1095
1095
name_ref => Some ( name_ref. to_owned ( ) ) ,
1096
1096
}
1097
1097
}
1098
+ ast:: Expr :: MacroExpr ( macro_expr) => {
1099
+ Some ( macro_expr. macro_call ( ) ?. path ( ) ?. segment ( ) ?. to_string ( ) )
1100
+ }
1098
1101
ast:: Expr :: FieldExpr ( field_expr) => Some ( field_expr. name_ref ( ) ?. to_string ( ) ) ,
1099
1102
ast:: Expr :: PathExpr ( path_expr) => Some ( path_expr. path ( ) ?. segment ( ) ?. to_string ( ) ) ,
1100
1103
ast:: Expr :: PrefixExpr ( prefix_expr) => get_string_representation ( & prefix_expr. expr ( ) ?) ,
@@ -1497,6 +1500,11 @@ fn main() {
1497
1500
foo(param2);
1498
1501
//^^^^^^ param
1499
1502
1503
+ macro_rules! param {
1504
+ () => {};
1505
+ };
1506
+ foo(param!());
1507
+
1500
1508
let param_eter = 0;
1501
1509
bar(param_eter);
1502
1510
let param_eter_end = 0;
You can’t perform that action at this time.
0 commit comments