Diffstat (limited to 'tests/walker_struct.rs')
-rw-r--r--tests/walker_struct.rs17
1 files changed, 8 insertions, 9 deletions
diff --git a/tests/walker_struct.rs b/tests/walker_struct.rs
index 160e9b0..f4cc910 100644
--- a/tests/walker_struct.rs
+++ b/tests/walker_struct.rs
@@ -1,5 +1,5 @@
use effectful::{
- bound::ForceDynamic, effective::Effective, environment::{Environment, NativeForm}, is_send_sync
+ bound::{DynamicShim, ForceDynamic}, effective::Effective, environment::{Environment, NativeForm}, SendSync
};
use mockall::predicate::eq;
use treaty::{
@@ -20,13 +20,12 @@ use crate::common::{
mod common;
+#[derive(SendSync)]
struct X {
a: bool,
b: i32,
}
-is_send_sync!(X);
-
struct Info;
// This gives the struct walker enough information to walk the X struct.
@@ -136,7 +135,7 @@ fn sequence_of_field_values() {
.with(eq(OwnedStatic(true)))
.return_const(Flow::Done);
- Some(Box::new(visitor))
+ Some(Box::new(DynamicShim(visitor)))
});
assert_eq!(
@@ -166,7 +165,7 @@ fn sequence_of_field_values() {
.with(eq(OwnedStatic(42)))
.return_const(Flow::Done);
- Some(Box::new(visitor))
+ Some(Box::new(DynamicShim(visitor)))
});
assert_eq!(
@@ -179,7 +178,7 @@ fn sequence_of_field_values() {
VisitResult::Control(Flow::Done)
});
- Some(Box::new(visitor))
+ Some(Box::new(DynamicShim(visitor)))
});
// All other protocols are not used for this test.
@@ -230,7 +229,7 @@ fn has_struct_tag() {
VisitResult::Control(Flow::Done)
});
- Some(Box::new(visitor))
+ Some(Box::new(DynamicShim(visitor)))
});
// Walk the struct.
@@ -280,7 +279,7 @@ fn has_map_backup_tag() {
VisitResult::Control(Flow::Done)
});
- Some(Box::new(visitor))
+ Some(Box::new(DynamicShim(visitor)))
});
// Walk the struct.
@@ -333,7 +332,7 @@ fn borrowed_value_directly() {
VisitResult::Control(Flow::Done)
});
- Some(Box::new(visitor))
+ Some(Box::new(DynamicShim(visitor)))
});
// Walk the struct.