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):
1065
1065
1066
1066
# Add a message for macro invocation site if available in the local
1067
1067
# 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.
1068
1072
if span ['expansion' ] and \
1069
1073
not _is_external (window , span ['file_name' ]) and \
1070
- not span ['expansion' ]['macro_decl_name' ].startswith ( '#[ ' ):
1074
+ span ['expansion' ]['macro_decl_name' ].endswith ( '! ' ):
1071
1075
invoke_span , expansion = find_span_r (span )
1072
1076
# TODO: rustc now emits this in its text output in some cases.
1073
1077
# Consider trying to avoid the duplicate note.
You can’t perform that action at this time.
0 commit comments