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 compile fail test: must be debug #393

Merged
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
2 changes: 1 addition & 1 deletion proptest-derive/tests/compile-fail/must-be-debug.rs
Original file line number Diff line number Diff line change
Expand Up @@ -11,5 +11,5 @@ extern crate proptest_derive;

fn main() {}

#[derive(Arbitrary)]
#[derive(Arbitrary)] //~ `Foo` doesn't implement `Debug` [E0277]
struct Foo { x: usize } //~ `Foo` doesn't implement `Debug` [E0277]
14 changes: 7 additions & 7 deletions proptest/src/arbitrary/_alloc/ops.rs
Original file line number Diff line number Diff line change
Expand Up @@ -48,14 +48,14 @@ lift1!([PartialOrd] Range<A>; base => {

#[cfg(feature = "unstable")]
arbitrary!(
[Y: Arbitrary, R: Arbitrary] GeneratorState<Y, R>,
[Y: Arbitrary, R: Arbitrary] CoroutineState<Y, R>,
TupleUnion<(WA<SMapped<Y, Self>>, WA<SMapped<R, Self>>)>,
product_type![Y::Parameters, R::Parameters];
args => {
let product_unpack![y, r] = args;
prop_oneof![
static_map(any_with::<Y>(y), GeneratorState::Yielded),
static_map(any_with::<R>(r), GeneratorState::Complete)
static_map(any_with::<Y>(y), CoroutineState::Yielded),
static_map(any_with::<R>(r), CoroutineState::Complete)
]
}
);
Expand All @@ -65,7 +65,7 @@ use core::fmt;

#[cfg(feature = "unstable")]
impl<A: fmt::Debug + 'static, B: fmt::Debug + 'static>
functor::ArbitraryF2<A, B> for GeneratorState<A, B>
functor::ArbitraryF2<A, B> for CoroutineState<A, B>
{
type Parameters = ();

Expand All @@ -79,8 +79,8 @@ impl<A: fmt::Debug + 'static, B: fmt::Debug + 'static>
BS: Strategy<Value = B> + 'static,
{
prop_oneof![
fst.prop_map(GeneratorState::Yielded),
snd.prop_map(GeneratorState::Complete)
fst.prop_map(CoroutineState::Yielded),
snd.prop_map(CoroutineState::Complete)
]
.boxed()
}
Expand All @@ -99,6 +99,6 @@ mod test {

#[cfg(feature = "unstable")]
no_panic_test!(
generator_state => GeneratorState<u32, u64>
generator_state => CoroutineState<u32, u64>
);
}
2 changes: 1 addition & 1 deletion proptest/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
))]
#![cfg_attr(
feature = "unstable",
feature(allocator_api, try_trait_v2, generator_trait, never_type)
feature(allocator_api, try_trait_v2, coroutine_trait, never_type)
)]
#![cfg_attr(all(feature = "std", feature = "unstable"), feature(ip))]
#![cfg_attr(docsrs, feature(doc_cfg))]
Expand Down