You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Cargo has an issue (rust-lang/cargo#2305) with a proposed fix (rust-lang/cargo#2469), but it unfortunately can't land because the compiler currently considers --test and --cfg test synonymous.
I'm... surprised by this behavior, and I'd expect --cfg test to only pass the test cfg.
I looked at the history. Originally, test harness was only injected for --test, not for --cfg test. Then b808eab (in 2012!) explicitly changed this, with comments (but without rationale...). Fix seems to be a matter of reverting that commit.
Activity
alexcrichton commentedon May 16, 2016
Ah, and the steps to reproduce:
sanxiyn commentedon May 17, 2016
I looked at the history. Originally, test harness was only injected for
--test, not for--cfg test. Then b808eab (in 2012!) explicitly changed this, with comments (but without rationale...). Fix seems to be a matter of reverting that commit.Auto merge of #33821 - sanxiyn:cfg-test, r=nikomatsakis