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

api: remove Send bound from Arbitrary/Testable traits #263

Closed
wants to merge 1 commit into from

Conversation

BurntSushi
Copy link
Owner

The Send bound is a relic from the past. Indeed, the docs for the
Arbitrary trait have been outdated for quite some time. quickcheck
stopped running each test in a separate thread once
std::panic::catch_unwind was stabilized many moons ago. With
catch_unwind, the Send bound is no longer necessary.

We do need to retain the 'static bound though. Without that,
implementing shrink seems implausible.

Fixes #262

The Send bound is a relic from the past. Indeed, the docs for the
Arbitrary trait have been outdated for quite some time. quickcheck
stopped running each test in a separate thread once
`std::panic::catch_unwind` was stabilized many moons ago. With
`catch_unwind`, the `Send` bound is no longer necessary.

We do need to retain the `'static` bound though. Without that,
implementing shrink seems implausible.

Fixes #262
BurntSushi added a commit that referenced this pull request Dec 27, 2020
The Send bound is a relic from the past. Indeed, the docs for the
Arbitrary trait have been outdated for quite some time. quickcheck
stopped running each test in a separate thread once
`std::panic::catch_unwind` was stabilized many moons ago. With
`catch_unwind`, the `Send` bound is no longer necessary.

We do need to retain the `'static` bound though. Without that,
implementing shrink seems implausible.

Fixes #262, Closes #263
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.

Remove Send bound for Arbitrary?
1 participant