-
-
Notifications
You must be signed in to change notification settings - Fork 14.8k
Running cargo test with proc macro that uses main fails #62127
Copy link
Copy link
Closed
Labels
A-resolveArea: Name/path resolution done by `rustc_resolve` specificallyArea: Name/path resolution done by `rustc_resolve` specificallyP-highHigh priorityHigh priorityT-compilerRelevant to the compiler team, which will review and decide on the PR/issue.Relevant to the compiler team, which will review and decide on the PR/issue.
Metadata
Metadata
Assignees
Labels
A-resolveArea: Name/path resolution done by `rustc_resolve` specificallyArea: Name/path resolution done by `rustc_resolve` specificallyP-highHigh priorityHigh priorityT-compilerRelevant to the compiler team, which will review and decide on the PR/issue.Relevant to the compiler team, which will review and decide on the PR/issue.
Type
Fields
Give feedbackNo fields configured for issues without a type.
Attempting to run test with proc macro that uses
mainas identifier fails with following error:Rustc version:
rustc 1.37.0-nightly (8aa42ed7c 2019-06-24)But it seems it wasn't present in
rustc 1.35.0 (3c235d560 2019-05-20)UPD: It is present since
(400b409ef 2019-06-09)tooUPD 2: Might be always present as cargo test seems to inject own main
So something changed in the way such identifier is treated.
Code example: