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

Fix hygiene violations in some warnings #63

Merged
merged 1 commit into from
Nov 2, 2019
Merged

Fix hygiene violations in some warnings #63

merged 1 commit into from
Nov 2, 2019

Conversation

asomers
Copy link
Owner

@asomers asomers commented Nov 2, 2019

Pull request #37 added some must_use warnings conditionalized on the
"nightly" feature. However, because proc macros are unhygienic, the
warnings were actually conditionalized on the instantiating crate's
nightly feature, not on mockall_derive's nightly feature. I didn't
notice at the time because Mockall also has a nightly feature, and so
does the only crate of mine that uses Mockall.

Fix the hygiene errors, and rename mockall_derive's feature to
"nightly_derive", which will help to catch similar errors in the future.

Pull request #37 added some must_use warnings conditionalized on the
"nightly" feature.  However, because proc macros are unhygienic, the
warnings were actually conditionalized on the instantiating crate's
nightly feature, not on mockall_derive's nightly feature.  I didn't
notice at the time because Mockall _also_ has a nightly feature, and so
does the only crate of mine that uses Mockall.

Fix the hygiene errors, and rename mockall_derive's feature to
"nightly_derive", which will help to catch similar errors in the future.
@asomers asomers merged commit 9886ba3 into master Nov 2, 2019
@asomers asomers deleted the must_use_2 branch November 2, 2019 18:12
asomers added a commit that referenced this pull request Nov 2, 2019
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

1 participant