Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion rust/messages.py
Original file line number Diff line number Diff line change
Expand Up @@ -1065,9 +1065,13 @@ def find_span_r(span, expansion=None):

# Add a message for macro invocation site if available in the local
# crate.
#
# `macro_decl_name` can be a variety of things, like fn-like macro,
# attribute, derive, "desugaring of", etc. We can generally only
# handle macro_rules macros.
if span['expansion'] and \
not _is_external(window, span['file_name']) and \
not span['expansion']['macro_decl_name'].startswith('#['):
span['expansion']['macro_decl_name'].endswith('!'):
invoke_span, expansion = find_span_r(span)
# TODO: rustc now emits this in its text output in some cases.
# Consider trying to avoid the duplicate note.
Expand Down