Skip to content

Commit 96a2dab

Browse files
authored
Merge pull request #464 from matthew-russo/master
[Doc] Arbitrary : add a note about the derive macro in Arbitrary's documentation
2 parents 24412f5 + 060cfbe commit 96a2dab

File tree

2 files changed

+8
-0
lines changed

2 files changed

+8
-0
lines changed

proptest/CHANGELOG.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,9 @@
55
- Setting `PROPTEST_MAX_DEFAULT_SIZE_RANGE` now customizes the default `SizeRange`
66
used by the default strategies for collections (like `Vec`). The default remains 100.
77

8+
### Documentation
9+
- Reference the derive macro in Arbitrary's documentation
10+
811
### Bug Fixes
912
- Fixed issue where config contextualization would clobber existing failure persistence config
1013

proptest/src/arbitrary/traits.rs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,10 +36,15 @@ use crate::strategy::Strategy;
3636
/// which may be lifted in the future as the [generic associated types (GAT)]
3737
/// feature of Rust is implemented and stabilized.
3838
///
39+
/// If you do not have unique constraints on how to generate the data for your
40+
/// custom types, consider using [the derive macro] to implement Arbitrary
41+
///
3942
/// [generic associated types (GAT)]: https://github.com/rust-lang/rust/issues/44265
4043
///
4144
/// [`Strategy`]: ../strategy/trait.Strategy.html
4245
///
46+
/// [the derive macro]: https://docs.rs/proptest-derive/latest/proptest_derive/
47+
///
4348
/// [HaskellQC]:
4449
/// https://hackage.haskell.org/package/QuickCheck/docs/Test-QuickCheck-Arbitrary.html
4550
pub trait Arbitrary: Sized + fmt::Debug {

0 commit comments

Comments
 (0)