File tree 1 file changed +12
-12
lines changed
1 file changed +12
-12
lines changed Original file line number Diff line number Diff line change @@ -107,48 +107,48 @@ pub async fn test() {
107
107
s. calls_mut ( ) . await ;
108
108
}
109
109
110
- pub async fn test_object_safe_without_default ( ) {
110
+ pub async fn test_dyn_compatible_without_default ( ) {
111
111
#[ async_trait]
112
- trait ObjectSafe {
112
+ trait DynCompatible {
113
113
async fn f ( & self ) ;
114
114
}
115
115
116
116
#[ async_trait]
117
- impl ObjectSafe for Struct {
117
+ impl DynCompatible for Struct {
118
118
async fn f ( & self ) { }
119
119
}
120
120
121
- let object = & Struct as & dyn ObjectSafe ;
121
+ let object = & Struct as & dyn DynCompatible ;
122
122
object. f ( ) . await ;
123
123
}
124
124
125
- pub async fn test_object_safe_with_default ( ) {
125
+ pub async fn test_dyn_compatible_with_default ( ) {
126
126
#[ async_trait]
127
- trait ObjectSafe : Sync {
127
+ trait DynCompatible : Sync {
128
128
async fn f ( & self ) { }
129
129
}
130
130
131
131
#[ async_trait]
132
- impl ObjectSafe for Struct {
132
+ impl DynCompatible for Struct {
133
133
async fn f ( & self ) { }
134
134
}
135
135
136
- let object = & Struct as & dyn ObjectSafe ;
136
+ let object = & Struct as & dyn DynCompatible ;
137
137
object. f ( ) . await ;
138
138
}
139
139
140
- pub async fn test_object_no_send ( ) {
140
+ pub async fn test_dyn_compatible_no_send ( ) {
141
141
#[ async_trait( ?Send ) ]
142
- trait ObjectSafe : Sync {
142
+ trait DynCompatible : Sync {
143
143
async fn f ( & self ) { }
144
144
}
145
145
146
146
#[ async_trait( ?Send ) ]
147
- impl ObjectSafe for Struct {
147
+ impl DynCompatible for Struct {
148
148
async fn f ( & self ) { }
149
149
}
150
150
151
- let object = & Struct as & dyn ObjectSafe ;
151
+ let object = & Struct as & dyn DynCompatible ;
152
152
object. f ( ) . await ;
153
153
}
154
154
You can’t perform that action at this time.
0 commit comments