Skip to content

Conversation

@jonas-schievink
Copy link
Contributor

Fixes #6992

r? @edwin0cheng

I'm not sure if this is totally correct, it looks like we create two EagerCallLocs per macro invocation, one for the arguments (?), and one for the actual macro call. I gave both the same AstId, hopefully that's correct.

@edwin0cheng
Copy link
Contributor

edwin0cheng commented Dec 23, 2020

we create two EagerCallLocs per macro invocation, one for the arguments

IIRC, it is because eager macro can be chained (e.g. include!(concat!(..., ..)))) and we cannot alloc new MacroCallID here because we do not alloc to do that in item collection phase. (But actual reason I forgot :( )

LGTM

bors r+

@bors
Copy link
Contributor

bors bot commented Dec 23, 2020

@bors bors bot merged commit 493e29d into rust-lang:master Dec 23, 2020
@jonas-schievink jonas-schievink deleted the eager-macro-call-loc branch December 23, 2020 09:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

panic when using 'go to definition' on include!d file

2 participants