-
Notifications
You must be signed in to change notification settings - Fork 12.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Duplicate crate macros failing to differentiate #71259
Comments
Since, this has been fixed on nightly, I assume we can close it. I thought I'd open for reference reasons. |
Sounds like something @petrochenkov might know about |
No idea how this happened and I don't remember fixing anything similar. This look like a serious bug, it would be great to bisect this to find out what made it disappear. |
@rustbot ping bisect |
Hey Cleanup Crew ICE-breakers! This bug has been identified as a good cc @AminArria @chrissimpkins @contrun @DutchGhost @elshize @ethanboxx @h-michael @HallerPatrick @hdhoang @hellow554 @imtsuki @jakevossen5 @kanru @KarlK90 @LeSeulArtichaut @MAdrianMattocks @matheus-consoli @mental32 @nmccarty @Noah-Kennedy @pard68 @PeytonT @pierreN @Redblueflame @RobbieClarken @RobertoSnap @robjtede @SarthakSingh31 @senden9 @shekohex @sinato @spastorino @turboladen @woshilapin @yerke |
@robjtede Before #66364 in this line two So #66364 indeed fixed the issue and not masked it. The condition for the test is that two library crates should have the same name and should export macros with the same name. |
Here is a reproduction:
https://github.com/LucioFranco/rustc-duplicate-macro-bug/
I've added comments on how to trigger the bug. But it looks like if we have one crate but two versions imported into the same project. Aka using cargo's rename feature, then rust picks up that if we use one of the macros that the other one even if its from a different version is the same. Commenting out the tower01
assert_request_eq
allows the second one to compile properly. If its not commented out thetower03
version will fail to compile because it is attempting to use thetower01
version which doesn't await the inner future.Meta
This happens currently on
rustc 1.42.0 (b8cedc004 2020-03-09)
but not on a newer nightlycargo 1.44.0-nightly (390e8f245 2020-04-07)
. So this has probably been fixed but I couldn't find any issue for this specific problem.The text was updated successfully, but these errors were encountered: