Skip to content

Commit

Permalink
Merge pull request #558 from jannic/issue-537
Browse files Browse the repository at this point in the history
Wrap getting a &mut from a static mut in an unsafe block
  • Loading branch information
adamgreig authored Nov 3, 2024
2 parents 9aadad7 + 616391e commit e41d989
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions cortex-m-rt/macros/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ pub fn entry(args: TokenStream, input: TokenStream) -> TokenStream {
{
#(#attrs)*
static mut #ident: #ty = #expr;
&mut #ident
unsafe { &mut #ident }
}
}
})
Expand Down Expand Up @@ -487,7 +487,7 @@ pub fn exception(args: TokenStream, input: TokenStream) -> TokenStream {
{
#(#attrs)*
static mut #ident: #ty = #expr;
&mut #ident
unsafe { &mut #ident }
}
}
})
Expand Down Expand Up @@ -598,7 +598,7 @@ pub fn interrupt(args: TokenStream, input: TokenStream) -> TokenStream {
{
#(#attrs)*
static mut #ident: #ty = #expr;
&mut #ident
unsafe { &mut #ident }
}
}
})
Expand Down

0 comments on commit e41d989

Please sign in to comment.