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 prop_state_machine cannot find value config #377

Merged
merged 1 commit into from
Oct 17, 2023

Conversation

sameer
Copy link
Contributor

@sameer sameer commented Oct 9, 2023

When #![proptest_config(..)] is not provided, the macro should use the default proptest config. This PR fixes an issue that prevents this from working -- there's a reference to config that should be Default::default() instead:

error[E0425]: cannot find value `config` in this scope
     |
2132 | /     prop_state_machine! {
2133 | |         #[test]
2134 | |         fn run(sequential 1..20 => MyTest);
2135 | |     }
     | |_____^ not found in this scope
     |
     = note: this error originates in the macro `prop_state_machine` (in Nightly builds, run with -Z macro-backtrace for more info)

When `#![proptest_config(..)]` is not provided, the macro should use the
default proptest config.
Copy link
Member

@matthew-russo matthew-russo left a comment

Choose a reason for hiding this comment

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

lgtm

Copy link
Contributor

@tzemanovic tzemanovic left a comment

Choose a reason for hiding this comment

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

Thx!

@sameer
Copy link
Contributor Author

sameer commented Oct 13, 2023

Just dropping a note that the test failures are unrelated. It's because the checks use Rust 1.64 but regex-automata v0.4.1 expects 1.65+.

@tzemanovic
Copy link
Contributor

Just dropping a note that the test failures are unrelated. It's because the checks use Rust 1.64 but regex-automata v0.4.1 expects 1.65+.

yup, it's fixed on master now - merging

@tzemanovic tzemanovic merged commit 6f534cb into proptest-rs:master Oct 17, 2023
1 of 5 checks passed
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.

4 participants