Skip to content

Commit 97f1b1d

Browse files
authored
Remove extraneous Send bound from bindgen-generated exports (#10685)
Accidental regression from #10044. Closes #10677
1 parent 43db461 commit 97f1b1d

23 files changed

+158
-551
lines changed

crates/component-macro/tests/expanded/char.rs

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -316,10 +316,7 @@ pub mod exports {
316316
&self,
317317
mut store: S,
318318
arg0: char,
319-
) -> wasmtime::Result<()>
320-
where
321-
<S as wasmtime::AsContext>::Data: Send,
322-
{
319+
) -> wasmtime::Result<()> {
323320
let callee = unsafe {
324321
wasmtime::component::TypedFunc::<
325322
(char,),
@@ -334,10 +331,7 @@ pub mod exports {
334331
pub fn call_return_char<S: wasmtime::AsContextMut>(
335332
&self,
336333
mut store: S,
337-
) -> wasmtime::Result<char>
338-
where
339-
<S as wasmtime::AsContext>::Data: Send,
340-
{
334+
) -> wasmtime::Result<char> {
341335
let callee = unsafe {
342336
wasmtime::component::TypedFunc::<
343337
(),

crates/component-macro/tests/expanded/conventions.rs

Lines changed: 12 additions & 48 deletions
Original file line numberDiff line numberDiff line change
@@ -608,10 +608,7 @@ pub mod exports {
608608
pub fn call_kebab_case<S: wasmtime::AsContextMut>(
609609
&self,
610610
mut store: S,
611-
) -> wasmtime::Result<()>
612-
where
613-
<S as wasmtime::AsContext>::Data: Send,
614-
{
611+
) -> wasmtime::Result<()> {
615612
let callee = unsafe {
616613
wasmtime::component::TypedFunc::<
617614
(),
@@ -626,10 +623,7 @@ pub mod exports {
626623
&self,
627624
mut store: S,
628625
arg0: LudicrousSpeed,
629-
) -> wasmtime::Result<()>
630-
where
631-
<S as wasmtime::AsContext>::Data: Send,
632-
{
626+
) -> wasmtime::Result<()> {
633627
let callee = unsafe {
634628
wasmtime::component::TypedFunc::<
635629
(LudicrousSpeed,),
@@ -643,10 +637,7 @@ pub mod exports {
643637
pub fn call_function_with_dashes<S: wasmtime::AsContextMut>(
644638
&self,
645639
mut store: S,
646-
) -> wasmtime::Result<()>
647-
where
648-
<S as wasmtime::AsContext>::Data: Send,
649-
{
640+
) -> wasmtime::Result<()> {
650641
let callee = unsafe {
651642
wasmtime::component::TypedFunc::<
652643
(),
@@ -659,10 +650,7 @@ pub mod exports {
659650
}
660651
pub fn call_function_with_no_weird_characters<
661652
S: wasmtime::AsContextMut,
662-
>(&self, mut store: S) -> wasmtime::Result<()>
663-
where
664-
<S as wasmtime::AsContext>::Data: Send,
665-
{
653+
>(&self, mut store: S) -> wasmtime::Result<()> {
666654
let callee = unsafe {
667655
wasmtime::component::TypedFunc::<
668656
(),
@@ -676,10 +664,7 @@ pub mod exports {
676664
pub fn call_apple<S: wasmtime::AsContextMut>(
677665
&self,
678666
mut store: S,
679-
) -> wasmtime::Result<()>
680-
where
681-
<S as wasmtime::AsContext>::Data: Send,
682-
{
667+
) -> wasmtime::Result<()> {
683668
let callee = unsafe {
684669
wasmtime::component::TypedFunc::<
685670
(),
@@ -693,10 +678,7 @@ pub mod exports {
693678
pub fn call_apple_pear<S: wasmtime::AsContextMut>(
694679
&self,
695680
mut store: S,
696-
) -> wasmtime::Result<()>
697-
where
698-
<S as wasmtime::AsContext>::Data: Send,
699-
{
681+
) -> wasmtime::Result<()> {
700682
let callee = unsafe {
701683
wasmtime::component::TypedFunc::<
702684
(),
@@ -710,10 +692,7 @@ pub mod exports {
710692
pub fn call_apple_pear_grape<S: wasmtime::AsContextMut>(
711693
&self,
712694
mut store: S,
713-
) -> wasmtime::Result<()>
714-
where
715-
<S as wasmtime::AsContext>::Data: Send,
716-
{
695+
) -> wasmtime::Result<()> {
717696
let callee = unsafe {
718697
wasmtime::component::TypedFunc::<
719698
(),
@@ -727,10 +706,7 @@ pub mod exports {
727706
pub fn call_a0<S: wasmtime::AsContextMut>(
728707
&self,
729708
mut store: S,
730-
) -> wasmtime::Result<()>
731-
where
732-
<S as wasmtime::AsContext>::Data: Send,
733-
{
709+
) -> wasmtime::Result<()> {
734710
let callee = unsafe {
735711
wasmtime::component::TypedFunc::<
736712
(),
@@ -749,10 +725,7 @@ pub mod exports {
749725
pub fn call_is_xml<S: wasmtime::AsContextMut>(
750726
&self,
751727
mut store: S,
752-
) -> wasmtime::Result<()>
753-
where
754-
<S as wasmtime::AsContext>::Data: Send,
755-
{
728+
) -> wasmtime::Result<()> {
756729
let callee = unsafe {
757730
wasmtime::component::TypedFunc::<
758731
(),
@@ -766,10 +739,7 @@ pub mod exports {
766739
pub fn call_explicit<S: wasmtime::AsContextMut>(
767740
&self,
768741
mut store: S,
769-
) -> wasmtime::Result<()>
770-
where
771-
<S as wasmtime::AsContext>::Data: Send,
772-
{
742+
) -> wasmtime::Result<()> {
773743
let callee = unsafe {
774744
wasmtime::component::TypedFunc::<
775745
(),
@@ -783,10 +753,7 @@ pub mod exports {
783753
pub fn call_explicit_kebab<S: wasmtime::AsContextMut>(
784754
&self,
785755
mut store: S,
786-
) -> wasmtime::Result<()>
787-
where
788-
<S as wasmtime::AsContext>::Data: Send,
789-
{
756+
) -> wasmtime::Result<()> {
790757
let callee = unsafe {
791758
wasmtime::component::TypedFunc::<
792759
(),
@@ -801,10 +768,7 @@ pub mod exports {
801768
pub fn call_bool<S: wasmtime::AsContextMut>(
802769
&self,
803770
mut store: S,
804-
) -> wasmtime::Result<()>
805-
where
806-
<S as wasmtime::AsContext>::Data: Send,
807-
{
771+
) -> wasmtime::Result<()> {
808772
let callee = unsafe {
809773
wasmtime::component::TypedFunc::<
810774
(),

crates/component-macro/tests/expanded/flags.rs

Lines changed: 7 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -713,10 +713,7 @@ pub mod exports {
713713
&self,
714714
mut store: S,
715715
arg0: Flag1,
716-
) -> wasmtime::Result<Flag1>
717-
where
718-
<S as wasmtime::AsContext>::Data: Send,
719-
{
716+
) -> wasmtime::Result<Flag1> {
720717
let callee = unsafe {
721718
wasmtime::component::TypedFunc::<
722719
(Flag1,),
@@ -731,10 +728,7 @@ pub mod exports {
731728
&self,
732729
mut store: S,
733730
arg0: Flag2,
734-
) -> wasmtime::Result<Flag2>
735-
where
736-
<S as wasmtime::AsContext>::Data: Send,
737-
{
731+
) -> wasmtime::Result<Flag2> {
738732
let callee = unsafe {
739733
wasmtime::component::TypedFunc::<
740734
(Flag2,),
@@ -749,10 +743,7 @@ pub mod exports {
749743
&self,
750744
mut store: S,
751745
arg0: Flag4,
752-
) -> wasmtime::Result<Flag4>
753-
where
754-
<S as wasmtime::AsContext>::Data: Send,
755-
{
746+
) -> wasmtime::Result<Flag4> {
756747
let callee = unsafe {
757748
wasmtime::component::TypedFunc::<
758749
(Flag4,),
@@ -767,10 +758,7 @@ pub mod exports {
767758
&self,
768759
mut store: S,
769760
arg0: Flag8,
770-
) -> wasmtime::Result<Flag8>
771-
where
772-
<S as wasmtime::AsContext>::Data: Send,
773-
{
761+
) -> wasmtime::Result<Flag8> {
774762
let callee = unsafe {
775763
wasmtime::component::TypedFunc::<
776764
(Flag8,),
@@ -785,10 +773,7 @@ pub mod exports {
785773
&self,
786774
mut store: S,
787775
arg0: Flag16,
788-
) -> wasmtime::Result<Flag16>
789-
where
790-
<S as wasmtime::AsContext>::Data: Send,
791-
{
776+
) -> wasmtime::Result<Flag16> {
792777
let callee = unsafe {
793778
wasmtime::component::TypedFunc::<
794779
(Flag16,),
@@ -803,10 +788,7 @@ pub mod exports {
803788
&self,
804789
mut store: S,
805790
arg0: Flag32,
806-
) -> wasmtime::Result<Flag32>
807-
where
808-
<S as wasmtime::AsContext>::Data: Send,
809-
{
791+
) -> wasmtime::Result<Flag32> {
810792
let callee = unsafe {
811793
wasmtime::component::TypedFunc::<
812794
(Flag32,),
@@ -821,10 +803,7 @@ pub mod exports {
821803
&self,
822804
mut store: S,
823805
arg0: Flag64,
824-
) -> wasmtime::Result<Flag64>
825-
where
826-
<S as wasmtime::AsContext>::Data: Send,
827-
{
806+
) -> wasmtime::Result<Flag64> {
828807
let callee = unsafe {
829808
wasmtime::component::TypedFunc::<
830809
(Flag64,),

crates/component-macro/tests/expanded/floats.rs

Lines changed: 4 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -350,10 +350,7 @@ pub mod exports {
350350
&self,
351351
mut store: S,
352352
arg0: f32,
353-
) -> wasmtime::Result<()>
354-
where
355-
<S as wasmtime::AsContext>::Data: Send,
356-
{
353+
) -> wasmtime::Result<()> {
357354
let callee = unsafe {
358355
wasmtime::component::TypedFunc::<
359356
(f32,),
@@ -368,10 +365,7 @@ pub mod exports {
368365
&self,
369366
mut store: S,
370367
arg0: f64,
371-
) -> wasmtime::Result<()>
372-
where
373-
<S as wasmtime::AsContext>::Data: Send,
374-
{
368+
) -> wasmtime::Result<()> {
375369
let callee = unsafe {
376370
wasmtime::component::TypedFunc::<
377371
(f64,),
@@ -385,10 +379,7 @@ pub mod exports {
385379
pub fn call_f32_result<S: wasmtime::AsContextMut>(
386380
&self,
387381
mut store: S,
388-
) -> wasmtime::Result<f32>
389-
where
390-
<S as wasmtime::AsContext>::Data: Send,
391-
{
382+
) -> wasmtime::Result<f32> {
392383
let callee = unsafe {
393384
wasmtime::component::TypedFunc::<
394385
(),
@@ -402,10 +393,7 @@ pub mod exports {
402393
pub fn call_f64_result<S: wasmtime::AsContextMut>(
403394
&self,
404395
mut store: S,
405-
) -> wasmtime::Result<f64>
406-
where
407-
<S as wasmtime::AsContext>::Data: Send,
408-
{
396+
) -> wasmtime::Result<f64> {
409397
let callee = unsafe {
410398
wasmtime::component::TypedFunc::<
411399
(),

crates/component-macro/tests/expanded/function-new.rs

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -161,10 +161,7 @@ const _: () = {
161161
pub fn call_new<S: wasmtime::AsContextMut>(
162162
&self,
163163
mut store: S,
164-
) -> wasmtime::Result<()>
165-
where
166-
<S as wasmtime::AsContext>::Data: Send,
167-
{
164+
) -> wasmtime::Result<()> {
168165
let callee = unsafe {
169166
wasmtime::component::TypedFunc::<(), ()>::new_unchecked(self.new)
170167
};

0 commit comments

Comments
 (0)