WIP: Make unborrow safe to use

This commit is contained in:
Grant Miller
2022-07-03 16:16:10 -05:00
committed by Dario Nieuwenhuis
parent ffbd9363f2
commit 65a82d02d1
16 changed files with 221 additions and 221 deletions

View File

@ -27,8 +27,11 @@ pub fn run(name: syn::Ident) -> Result<TokenStream, TokenStream> {
unsafe impl ::embassy_hal_common::Unborrow for #name_interrupt {
type Target = #name_interrupt;
unsafe fn unborrow(self) -> #name_interrupt {
self
fn unborrow<'a>(self) -> ::embassy_hal_common::Unborrowed<'a, #name_interrupt>
where
Self: 'a
{
::embassy_hal_common::Unborrowed::new(self)
}
}
};