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

Correctly process the concretize attribute within cfg_attr #428

Merged
merged 1 commit into from
Nov 20, 2022

Conversation

asomers
Copy link
Owner

@asomers asomers commented Nov 14, 2022

The concretize attribute isn't processed as a normal Rust attribute. Instead, Mockall processes it as text. So we need to process any cfg_attr directive ourselves. Rather than attempt to evaluate the conditional, just assume that it's true. By far the most common use case will be cfg_attr(test, concretize).

Fixes #427

The concretize attribute isn't processed as a normal Rust attribute.
Instead, Mockall processes it as text.  So we need to process any
cfg_attr directive ourselves.  Rather than attempt to evaluate the
conditional, just assume that it's true.  By far the most common use
case will be `cfg_attr(test, concretize)`.

Fixes #427
@asomers asomers merged commit 231bd5f into master Nov 20, 2022
@asomers asomers deleted the cfg_attr_concretize branch November 20, 2022 15:33
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.

Concretize doesn't work with cfg_attr
1 participant