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 the [pub] hack in prop_compose! #97

Closed
boustrophedon opened this issue Oct 25, 2018 · 3 comments
Closed

Fix the [pub] hack in prop_compose! #97

boustrophedon opened this issue Oct 25, 2018 · 3 comments
Labels
2.0-wishlist This issue proposes breaking changes we'd like in a 2.0 release duplicate This issue has been reported somewhere else feature-request This issue is requesting new functionality

Comments

@boustrophedon
Copy link

As of 1.30 it seems that you can now match on visibility keywords. Does this enable us to get rid of the [pub] hack in the prop_compose! macro? I haven't played with advanced macros so I'm not sure if it actually solves the problem. Also, it would make using the crate itself require a rustc >= 1.30.

@AltSysrq AltSysrq added duplicate This issue has been reported somewhere else feature-request This issue is requesting new functionality 2.0-wishlist This issue proposes breaking changes we'd like in a 2.0 release labels Oct 25, 2018
@AltSysrq
Copy link
Collaborator

Duplicate of #10

Thanks for pointing out that it's now stable though, that had fallen off my radar. I'll see about adding support for the new matcher next time there's a release with breaking changes.

@Centril
Copy link
Collaborator

Centril commented Oct 26, 2018

I'd recommend lumping in this change with the stabilization of the ? macro matcher (rust-lang/rust#48075 (comment)) at least as well as a change to edition 2018. This should make the macros somewhat simpler.

We might also want to consider experimenting with attribute proc macros now that they are stable, for example:

#[proptest]
fn foo(x: u8, ...) { .. }

tho it is unclear what to do about the x in strategy syntax as it would likely result in a parse error before attr proc macro expansion gets to run.

@AltSysrq
Copy link
Collaborator

AltSysrq commented Feb 4, 2019

At long last, this issue is fixed in 0.9.0. Unfortunately I wasn't able to preserve the old way of doing things, so when you upgrade you will need to remove the brackets around the visibility modifier.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
2.0-wishlist This issue proposes breaking changes we'd like in a 2.0 release duplicate This issue has been reported somewhere else feature-request This issue is requesting new functionality
Projects
None yet
Development

No branches or pull requests

3 participants