Description
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 the tower03
version will fail to compile because it is attempting to use the tower01
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 nightly cargo 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.