Skip to content
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

tests: cfg-ignore compat tests if there is no compat feature #2353

Merged
merged 1 commit into from Feb 22, 2021

Conversation

nrc
Copy link
Member

@nrc nrc commented Feb 22, 2021

I realise that cargo test is meant to be run using --all-features, however, this is not obvious the first time one runs tests because the error about the missing compat module happens first, and the helpful message about --all-features never gets output. With this change, we get far enough into compilation that you get to see the helpful error message, not the unhelpful ones. I believe this is an improvement to a contributors first experience (it would have saved me some time, for sure) and that outweighs the small noise of having the additional cfg lines.

Signed-off-by: Nick Cameron <nrc@ncameron.org>
@nrc nrc requested a review from taiki-e as a code owner February 22, 2021 03:42
Copy link
Member

@taiki-e taiki-e left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That makes sense. Thanks!

@taiki-e taiki-e merged commit 18e46e8 into rust-lang:master Feb 22, 2021
exrook pushed a commit to exrook/futures-rs that referenced this pull request Apr 5, 2021
exrook pushed a commit to exrook/futures-rs that referenced this pull request Apr 10, 2021
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.

None yet

2 participants