Skip to content

Commit d9f7a46

Browse files
committed
Non-Send fixes
1 parent 19c2790 commit d9f7a46

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/expand.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -160,7 +160,7 @@ fn transform_sig(context: Context, sig: &mut MethodSig, has_self: bool, has_defa
160160
}
161161
Context::Impl { .. } => true,
162162
};
163-
where_clause.predicates.push(if assume_bound {
163+
where_clause.predicates.push(if assume_bound || is_local {
164164
parse_quote!(Self: #lifetime)
165165
} else {
166166
parse_quote!(Self: core::marker::#bound + #lifetime)
@@ -189,10 +189,10 @@ fn transform_sig(context: Context, sig: &mut MethodSig, has_self: bool, has_defa
189189
}
190190
}
191191

192-
let bounds: Supertraits = if is_local {
193-
parse_quote!(#lifetime)
192+
let bounds = if is_local {
193+
quote!(#lifetime)
194194
} else {
195-
parse_quote!(#lifetime + core::marker::Send)
195+
quote!(core::marker::Send + #lifetime)
196196
};
197197

198198
sig.decl.output = parse_quote! {

0 commit comments

Comments
 (0)