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

[Doc] Arbitrary : add a note about the derive macro in Arbitrary's documentation #464

Merged
merged 1 commit into from
Jun 19, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions proptest/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,9 @@
- Setting `PROPTEST_MAX_DEFAULT_SIZE_RANGE` now customizes the default `SizeRange`
used by the default strategies for collections (like `Vec`). The default remains 100.

### Documentation
- Reference the derive macro in Arbitrary's documentation

### Bug Fixes
- Fixed issue where config contextualization would clobber existing failure persistence config

Expand Down
5 changes: 5 additions & 0 deletions proptest/src/arbitrary/traits.rs
Original file line number Diff line number Diff line change
Expand Up @@ -36,10 +36,15 @@ use crate::strategy::Strategy;
/// which may be lifted in the future as the [generic associated types (GAT)]
/// feature of Rust is implemented and stabilized.
///
/// If you do not have unique constraints on how to generate the data for your
/// custom types, consider using [the derive macro] to implement Arbitrary
///
/// [generic associated types (GAT)]: https://github.com/rust-lang/rust/issues/44265
///
/// [`Strategy`]: ../strategy/trait.Strategy.html
///
/// [the derive macro]: https://docs.rs/proptest-derive/latest/proptest_derive/
///
/// [HaskellQC]:
/// https://hackage.haskell.org/package/QuickCheck/docs/Test-QuickCheck-Arbitrary.html
pub trait Arbitrary: Sized + fmt::Debug {
Expand Down
Loading