Skip to content

Commit e119855

Browse files
committed
Limit scope of allow(coherence_leak_check)
1 parent 5b38cb1 commit e119855

File tree

2 files changed

+8
-5
lines changed

2 files changed

+8
-5
lines changed

src/convert/closures.rs

+8-4
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,8 @@ use crate::throw_str;
1010

1111
macro_rules! stack_closures {
1212
($( ($cnt:tt $invoke:ident $invoke_mut:ident $($var:ident $arg1:ident $arg2:ident $arg3:ident $arg4:ident)*) )*) => ($(
13-
impl<'a, 'b, $($var,)* R> IntoWasmAbi for &'a (dyn Fn($($var),*) -> R + 'b)
13+
#[allow(coherence_leak_check)]
14+
impl<$($var,)* R> IntoWasmAbi for &'_ (dyn Fn($($var),*) -> R + '_)
1415
where $($var: FromWasmAbi,)*
1516
R: ReturnWasmAbi
1617
{
@@ -50,7 +51,8 @@ macro_rules! stack_closures {
5051
ret.return_abi().into()
5152
}
5253

53-
impl<'a, $($var,)* R> WasmDescribe for dyn Fn($($var),*) -> R + 'a
54+
#[allow(coherence_leak_check)]
55+
impl<$($var,)* R> WasmDescribe for dyn Fn($($var),*) -> R + '_
5456
where $($var: FromWasmAbi,)*
5557
R: ReturnWasmAbi
5658
{
@@ -65,7 +67,8 @@ macro_rules! stack_closures {
6567
}
6668
}
6769

68-
impl<'a, 'b, $($var,)* R> IntoWasmAbi for &'a mut (dyn FnMut($($var),*) -> R + 'b)
70+
#[allow(coherence_leak_check)]
71+
impl<$($var,)* R> IntoWasmAbi for &'_ mut (dyn FnMut($($var),*) -> R + '_)
6972
where $($var: FromWasmAbi,)*
7073
R: ReturnWasmAbi
7174
{
@@ -105,7 +108,8 @@ macro_rules! stack_closures {
105108
ret.return_abi().into()
106109
}
107110

108-
impl<'a, $($var,)* R> WasmDescribe for dyn FnMut($($var),*) -> R + 'a
111+
#[allow(coherence_leak_check)]
112+
impl<$($var,)* R> WasmDescribe for dyn FnMut($($var),*) -> R + '_
109113
where $($var: FromWasmAbi,)*
110114
R: ReturnWasmAbi
111115
{

src/lib.rs

-1
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,6 @@
1616
feature(thread_local, allow_internal_unstable),
1717
allow(internal_features)
1818
)]
19-
#![allow(coherence_leak_check)]
2019
#![doc(html_root_url = "https://docs.rs/wasm-bindgen/0.2")]
2120

2221
extern crate alloc;

0 commit comments

Comments
 (0)