File tree Expand file tree Collapse file tree 1 file changed +8
-0
lines changed
Expand file tree Collapse file tree 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> {
10951095 name_ref => Some ( name_ref. to_owned ( ) ) ,
10961096 }
10971097 }
1098+ ast:: Expr :: MacroExpr ( macro_expr) => {
1099+ Some ( macro_expr. macro_call ( ) ?. path ( ) ?. segment ( ) ?. to_string ( ) )
1100+ }
10981101 ast:: Expr :: FieldExpr ( field_expr) => Some ( field_expr. name_ref ( ) ?. to_string ( ) ) ,
10991102 ast:: Expr :: PathExpr ( path_expr) => Some ( path_expr. path ( ) ?. segment ( ) ?. to_string ( ) ) ,
11001103 ast:: Expr :: PrefixExpr ( prefix_expr) => get_string_representation ( & prefix_expr. expr ( ) ?) ,
@@ -1497,6 +1500,11 @@ fn main() {
14971500 foo(param2);
14981501 //^^^^^^ param
14991502
1503+ macro_rules! param {
1504+ () => {};
1505+ };
1506+ foo(param!());
1507+
15001508 let param_eter = 0;
15011509 bar(param_eter);
15021510 let param_eter_end = 0;
You can’t perform that action at this time.
0 commit comments