You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The code is copied from embedded book, and it doesn't cause any error during compiling. But rust-analyzer reports six errors about missing-unsafe. And there is another error says that Function SysTick should have snake_case name. However, sys_tick really cause an error. It's not a valid exception name.
#[exception]fnSysTick(){staticmutCOUNT:u32 = 0;staticmutSTDOUT:Option<HStdout> = None;*COUNT += 1;// Lazy initializationifSTDOUT.is_none(){*STDOUT = hio::hstdout().ok();}ifletSome(hstdout) = STDOUT.as_mut(){write!(hstdout, "{}", *COUNT).ok();}// IMPORTANT omit this `if` block if running on real hardware or your// debugger will end in an inconsistent stateif*COUNT == 9{// This will terminate the QEMU process
debug::exit(debug::EXIT_SUCCESS);}}
All diagnostics report their identifier, which you can add to the diagnostics.disabled list you're already using. This will silence the diagnostic.
Note that the reason we report these diagnostics in the first place is because we do not expand the #[exception] macro. This is being worked on and we've landed experimental support for this in #9128, so you can also try that out (this currently breaks IDE functionality within the annotated function, so this is probably not quite usable in your case).
The code is copied from embedded book, and it doesn't cause any error during compiling. But
rust-analyzer
reports six errors aboutmissing-unsafe
. And there is another error says thatFunction SysTick should have snake_case name.
However,sys_tick
really cause an error. It's not a valid exception name.Here is my configuration about
rust-analyzer
.Thank you.
The text was updated successfully, but these errors were encountered: