aboutsummaryrefslogtreecommitdiff
path: root/rtic/macros/ui/local-shared-attribute.rs
diff options
context:
space:
mode:
Diffstat (limited to 'rtic/macros/ui/local-shared-attribute.rs')
-rw-r--r--rtic/macros/ui/local-shared-attribute.rs21
1 files changed, 21 insertions, 0 deletions
diff --git a/rtic/macros/ui/local-shared-attribute.rs b/rtic/macros/ui/local-shared-attribute.rs
new file mode 100644
index 00000000..c594b5f6
--- /dev/null
+++ b/rtic/macros/ui/local-shared-attribute.rs
@@ -0,0 +1,21 @@
+#![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) {}
+}