File tree Expand file tree Collapse file tree 1 file changed +5
-1
lines changed Expand file tree Collapse file tree 1 file changed +5
-1
lines changed Original file line number Diff line number Diff line change @@ -1065,9 +1065,13 @@ def find_span_r(span, expansion=None):
10651065
10661066 # Add a message for macro invocation site if available in the local
10671067 # crate.
1068+ #
1069+ # `macro_decl_name` can be a variety of things, like fn-like macro,
1070+ # attribute, derive, "desugaring of", etc. We can generally only
1071+ # handle macro_rules macros.
10681072 if span ['expansion' ] and \
10691073 not _is_external (window , span ['file_name' ]) and \
1070- not span ['expansion' ]['macro_decl_name' ].startswith ( '#[ ' ):
1074+ span ['expansion' ]['macro_decl_name' ].endswith ( '! ' ):
10711075 invoke_span , expansion = find_span_r (span )
10721076 # TODO: rustc now emits this in its text output in some cases.
10731077 # Consider trying to avoid the duplicate note.
You can’t perform that action at this time.
0 commit comments