aboutsummaryrefslogtreecommitdiff
path: root/embassy-rp/src/lib.rs
diff options
context:
space:
mode:
authorDario Nieuwenhuis <[email protected]>2024-11-08 13:20:13 +0100
committerDario Nieuwenhuis <[email protected]>2024-11-08 13:20:13 +0100
commit0de204ccd7fea064f1b2ad5f0830a9b8ff0a09a9 (patch)
tree8581bf7a96d524d0b1c972d41bcc20aa4c02c4af /embassy-rp/src/lib.rs
parent05d36233fc2336b17112dda52aaa0f53251c0dc0 (diff)
Fix "non-local impl definition" warning from recent nightlies.
Diffstat (limited to 'embassy-rp/src/lib.rs')
-rw-r--r--embassy-rp/src/lib.rs15
1 files changed, 12 insertions, 3 deletions
diff --git a/embassy-rp/src/lib.rs b/embassy-rp/src/lib.rs
index 51f6ed7f8..f0893b5a0 100644
--- a/embassy-rp/src/lib.rs
+++ b/embassy-rp/src/lib.rs
@@ -175,8 +175,8 @@ macro_rules! bind_interrupts {
175 ),*; 175 ),*;
176 )* 176 )*
177 }) => { 177 }) => {
178 #[derive(Copy, Clone)] 178 #[derive(Copy, Clone)]
179 $vis struct $name; 179 $vis struct $name;
180 180
181 $( 181 $(
182 #[allow(non_snake_case)] 182 #[allow(non_snake_case)]
@@ -187,12 +187,21 @@ macro_rules! bind_interrupts {
187 $(#[cfg($cond_handler)])? 187 $(#[cfg($cond_handler)])?
188 <$handler as $crate::interrupt::typelevel::Handler<$crate::interrupt::typelevel::$irq>>::on_interrupt(); 188 <$handler as $crate::interrupt::typelevel::Handler<$crate::interrupt::typelevel::$irq>>::on_interrupt();
189 189
190 )*
191 }
192
193 $(#[cfg($cond_irq)])?
194 $crate::bind_interrupts!(@inner
195 $(
190 $(#[cfg($cond_handler)])? 196 $(#[cfg($cond_handler)])?
191 unsafe impl $crate::interrupt::typelevel::Binding<$crate::interrupt::typelevel::$irq, $handler> for $name {} 197 unsafe impl $crate::interrupt::typelevel::Binding<$crate::interrupt::typelevel::$irq, $handler> for $name {}
192 )* 198 )*
193 } 199 );
194 )* 200 )*
195 }; 201 };
202 (@inner $($t:tt)*) => {
203 $($t)*
204 }
196} 205}
197 206
198#[cfg(feature = "rp2040")] 207#[cfg(feature = "rp2040")]