rtic/rtic-macros/ui/local-shared-attribute.rs
2023-03-01 00:35:13 +01:00

21 lines
338 B
Rust

#![no_main]
#[rtic_macros::mock_app(device = mock)]
mod app {
#[shared]
struct Shared {}
#[local]
struct Local {}
#[init]
fn init(_: init::Context) -> (Shared, Local) {}
#[task(local = [
#[test]
a: u32 = 0, // Ok
#[test]
b, // Error
])]
fn foo(_: foo::Context) {}
}