Merge pull request #3516 from embassy-rs/fix-nonlocal

Fix "non-local impl definition" warning from recent nightlies.
This commit is contained in:
Dario Nieuwenhuis 2024-11-08 12:28:09 +00:00 committed by GitHub
commit dc9fc73704
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with 56 additions and 29 deletions

View File

@ -198,13 +198,22 @@ macro_rules! bind_interrupts {
$(#[cfg($cond_handler)])?
<$handler as $crate::interrupt::typelevel::Handler<$crate::interrupt::typelevel::$irq>>::on_interrupt();
)*
}
$(#[cfg($cond_irq)])?
$crate::bind_interrupts!(@inner
$(
$(#[cfg($cond_handler)])?
unsafe impl $crate::interrupt::typelevel::Binding<$crate::interrupt::typelevel::$irq, $handler> for $name {}
)*
}
);
)*
};
(@inner $($t:tt)*) => {
$($t)*
}
}
// Reexports

View File

@ -187,12 +187,21 @@ macro_rules! bind_interrupts {
$(#[cfg($cond_handler)])?
<$handler as $crate::interrupt::typelevel::Handler<$crate::interrupt::typelevel::$irq>>::on_interrupt();
)*
}
$(#[cfg($cond_irq)])?
$crate::bind_interrupts!(@inner
$(
$(#[cfg($cond_handler)])?
unsafe impl $crate::interrupt::typelevel::Binding<$crate::interrupt::typelevel::$irq, $handler> for $name {}
)*
}
);
)*
};
(@inner $($t:tt)*) => {
$($t)*
}
}
#[cfg(feature = "rp2040")]

View File

@ -186,12 +186,21 @@ macro_rules! bind_interrupts {
$(#[cfg($cond_handler)])?
<$handler as $crate::interrupt::typelevel::Handler<$crate::interrupt::typelevel::$irq>>::on_interrupt();
)*
}
$(#[cfg($cond_irq)])?
$crate::bind_interrupts!(@inner
$(
$(#[cfg($cond_handler)])?
unsafe impl $crate::interrupt::typelevel::Binding<$crate::interrupt::typelevel::$irq, $handler> for $name {}
)*
}
);
)*
};
(@inner $($t:tt)*) => {
$($t)*
}
}
// Reexports