From 584ac7e1b335411e3d923aeef92466efdc92ae50 Mon Sep 17 00:00:00 2001 From: Emil Fresk Date: Sun, 8 Jan 2023 16:25:46 +0100 Subject: [PATCH] Update UI tests, 1 failing that needs fixing --- macros/ui/async-local-resouces.rs | 28 ------------------- macros/ui/async-local-resouces.stderr | 5 ---- macros/ui/async-zero-prio-tasks.stderr | 11 -------- macros/ui/extern-interrupt-used.rs | 2 +- macros/ui/extern-interrupt-used.stderr | 2 +- macros/ui/idle-double-local.stderr | 2 +- macros/ui/idle-double-shared.stderr | 2 +- macros/ui/init-divergent.stderr | 4 +-- macros/ui/init-double-local.stderr | 2 +- macros/ui/init-double-shared.stderr | 2 +- macros/ui/init-input.rs | 2 +- macros/ui/init-input.stderr | 6 ++-- macros/ui/init-no-context.rs | 2 +- macros/ui/init-no-context.stderr | 6 ++-- macros/ui/init-output.stderr | 4 +-- macros/ui/init-pub.rs | 2 +- macros/ui/init-pub.stderr | 6 ++-- macros/ui/init-unsafe.rs | 2 +- macros/ui/init-unsafe.stderr | 6 ++-- macros/ui/interrupt-double.stderr | 2 +- macros/ui/local-collision-2.rs | 7 ++--- macros/ui/local-collision-2.stderr | 10 +++---- macros/ui/local-collision.rs | 6 ++-- macros/ui/local-collision.stderr | 4 +-- macros/ui/local-malformed-1.rs | 4 +-- macros/ui/local-malformed-2.rs | 4 +-- macros/ui/local-malformed-2.stderr | 2 +- macros/ui/local-malformed-3.rs | 4 +-- macros/ui/local-malformed-4.rs | 4 +-- macros/ui/local-not-declared.rs | 4 +-- macros/ui/local-not-declared.stderr | 2 +- macros/ui/local-pub.rs | 6 ++++ macros/ui/local-pub.stderr | 8 +++--- macros/ui/local-shared-attribute.rs | 13 +++++++-- macros/ui/local-shared-attribute.stderr | 9 +++--- macros/ui/local-shared.rs | 6 ++-- macros/ui/local-shared.stderr | 4 +-- macros/ui/monotonic-binds-collision-task.rs | 10 ------- .../ui/monotonic-binds-collision-task.stderr | 5 ---- macros/ui/monotonic-binds-collision.rs | 10 ------- macros/ui/monotonic-binds-collision.stderr | 5 ---- macros/ui/monotonic-double-binds.rs | 7 ----- macros/ui/monotonic-double-binds.stderr | 5 ---- macros/ui/monotonic-double-default.rs | 7 ----- macros/ui/monotonic-double-default.stderr | 5 ---- macros/ui/monotonic-double-prio.rs | 7 ----- macros/ui/monotonic-double-prio.stderr | 5 ---- macros/ui/monotonic-double.rs | 10 ------- macros/ui/monotonic-double.stderr | 5 ---- macros/ui/monotonic-name-collision.rs | 10 ------- macros/ui/monotonic-name-collision.stderr | 5 ---- macros/ui/monotonic-no-binds.rs | 7 ----- macros/ui/monotonic-no-binds.stderr | 5 ---- macros/ui/monotonic-no-paran.rs | 8 ------ macros/ui/monotonic-no-paran.stderr | 5 ---- macros/ui/monotonic-timer-collision.rs | 10 ------- macros/ui/monotonic-timer-collision.stderr | 5 ---- macros/ui/monotonic-with-attrs.rs | 8 ------ macros/ui/monotonic-with-attrs.stderr | 5 ---- macros/ui/pub-local.stderr | 5 ---- macros/ui/pub-shared.stderr | 5 ---- macros/ui/shared-lock-free.rs | 6 ++-- macros/ui/shared-lock-free.stderr | 17 ----------- macros/ui/shared-not-declared.rs | 4 +-- macros/ui/shared-not-declared.stderr | 2 +- macros/ui/shared-pub.stderr | 2 +- macros/ui/task-divergent.rs | 2 +- macros/ui/task-divergent.stderr | 8 +++--- macros/ui/task-double-capacity.rs | 7 ----- macros/ui/task-double-capacity.stderr | 5 ---- macros/ui/task-double-local.rs | 2 +- macros/ui/task-double-local.stderr | 2 +- macros/ui/task-double-priority.rs | 2 +- macros/ui/task-double-priority.stderr | 2 +- macros/ui/task-double-shared.rs | 2 +- macros/ui/task-double-shared.stderr | 2 +- macros/ui/task-idle.rs | 2 +- macros/ui/task-idle.stderr | 6 ++-- macros/ui/task-init.rs | 4 +-- macros/ui/task-init.stderr | 6 ++-- macros/ui/task-interrupt.rs | 2 +- macros/ui/task-interrupt.stderr | 6 ++-- macros/ui/task-no-context.rs | 2 +- macros/ui/task-no-context.stderr | 8 +++--- macros/ui/task-priority-too-high.rs | 2 +- macros/ui/task-pub.rs | 2 +- macros/ui/task-pub.stderr | 8 +++--- macros/ui/task-unsafe.rs | 2 +- macros/ui/task-unsafe.stderr | 8 +++--- ...c-zero-prio-tasks.rs => task-zero-prio.rs} | 2 +- macros/ui/task-zero-prio.stderr | 5 ++++ 91 files changed, 134 insertions(+), 350 deletions(-) delete mode 100644 macros/ui/async-local-resouces.rs delete mode 100644 macros/ui/async-local-resouces.stderr delete mode 100644 macros/ui/async-zero-prio-tasks.stderr delete mode 100644 macros/ui/monotonic-binds-collision-task.rs delete mode 100644 macros/ui/monotonic-binds-collision-task.stderr delete mode 100644 macros/ui/monotonic-binds-collision.rs delete mode 100644 macros/ui/monotonic-binds-collision.stderr delete mode 100644 macros/ui/monotonic-double-binds.rs delete mode 100644 macros/ui/monotonic-double-binds.stderr delete mode 100644 macros/ui/monotonic-double-default.rs delete mode 100644 macros/ui/monotonic-double-default.stderr delete mode 100644 macros/ui/monotonic-double-prio.rs delete mode 100644 macros/ui/monotonic-double-prio.stderr delete mode 100644 macros/ui/monotonic-double.rs delete mode 100644 macros/ui/monotonic-double.stderr delete mode 100644 macros/ui/monotonic-name-collision.rs delete mode 100644 macros/ui/monotonic-name-collision.stderr delete mode 100644 macros/ui/monotonic-no-binds.rs delete mode 100644 macros/ui/monotonic-no-binds.stderr delete mode 100644 macros/ui/monotonic-no-paran.rs delete mode 100644 macros/ui/monotonic-no-paran.stderr delete mode 100644 macros/ui/monotonic-timer-collision.rs delete mode 100644 macros/ui/monotonic-timer-collision.stderr delete mode 100644 macros/ui/monotonic-with-attrs.rs delete mode 100644 macros/ui/monotonic-with-attrs.stderr delete mode 100644 macros/ui/pub-local.stderr delete mode 100644 macros/ui/pub-shared.stderr delete mode 100644 macros/ui/shared-lock-free.stderr delete mode 100644 macros/ui/task-double-capacity.rs delete mode 100644 macros/ui/task-double-capacity.stderr rename macros/ui/{async-zero-prio-tasks.rs => task-zero-prio.rs} (78%) create mode 100644 macros/ui/task-zero-prio.stderr diff --git a/macros/ui/async-local-resouces.rs b/macros/ui/async-local-resouces.rs deleted file mode 100644 index 1ba58652da..0000000000 --- a/macros/ui/async-local-resouces.rs +++ /dev/null @@ -1,28 +0,0 @@ -#![no_main] - -#[rtic_macros::mock_app(device = mock)] -mod app { - #[shared] - struct Shared { - #[lock_free] - e: u32, - } - - #[local] - struct Local {} - - #[init] - fn init(_: init::Context) -> (Shared, Local, init::Monotonics) {} - - // e ok - #[task(priority = 1, shared = [e])] - fn uart0(cx: uart0::Context) {} - - // e ok - #[task(priority = 1, shared = [e])] - fn uart1(cx: uart1::Context) {} - - // e not ok - #[task(priority = 1, shared = [e])] - async fn async_task(cx: async_task::Context) {} -} diff --git a/macros/ui/async-local-resouces.stderr b/macros/ui/async-local-resouces.stderr deleted file mode 100644 index 7ce7517d99..0000000000 --- a/macros/ui/async-local-resouces.stderr +++ /dev/null @@ -1,5 +0,0 @@ -error: Lock free shared resource "e" is used by an async tasks, which is forbidden - --> ui/async-local-resouces.rs:26:36 - | -26 | #[task(priority = 1, shared = [e])] - | ^ diff --git a/macros/ui/async-zero-prio-tasks.stderr b/macros/ui/async-zero-prio-tasks.stderr deleted file mode 100644 index d617feb275..0000000000 --- a/macros/ui/async-zero-prio-tasks.stderr +++ /dev/null @@ -1,11 +0,0 @@ -error: Software task "foo" has priority 0, but `#[idle]` is defined. 0-priority software tasks are only allowed if there is no `#[idle]`. - --> ui/async-zero-prio-tasks.rs:15:8 - | -15 | fn foo(_: foo::Context) {} - | ^^^ - -error: Software task "foo" has priority 0, but is not `async`. 0-priority software tasks must be `async`. - --> ui/async-zero-prio-tasks.rs:15:8 - | -15 | fn foo(_: foo::Context) {} - | ^^^ diff --git a/macros/ui/extern-interrupt-used.rs b/macros/ui/extern-interrupt-used.rs index a6e0b3b29a..6346a7d76e 100644 --- a/macros/ui/extern-interrupt-used.rs +++ b/macros/ui/extern-interrupt-used.rs @@ -9,7 +9,7 @@ mod app { struct Local {} #[init] - fn init(_: init::Context) -> (Shared, Local, init::Monotonics) {} + fn init(_: init::Context) -> (Shared, Local) {} #[task(binds = EXTI0)] fn foo(_: foo::Context) {} diff --git a/macros/ui/extern-interrupt-used.stderr b/macros/ui/extern-interrupt-used.stderr index f9510d7037..970d39be77 100644 --- a/macros/ui/extern-interrupt-used.stderr +++ b/macros/ui/extern-interrupt-used.stderr @@ -1,5 +1,5 @@ error: dispatcher interrupts can't be used as hardware tasks - --> $DIR/extern-interrupt-used.rs:14:20 + --> ui/extern-interrupt-used.rs:14:20 | 14 | #[task(binds = EXTI0)] | ^^^^^ diff --git a/macros/ui/idle-double-local.stderr b/macros/ui/idle-double-local.stderr index d3ba4ec9f7..b558136a0d 100644 --- a/macros/ui/idle-double-local.stderr +++ b/macros/ui/idle-double-local.stderr @@ -1,5 +1,5 @@ error: argument appears more than once - --> $DIR/idle-double-local.rs:5:25 + --> ui/idle-double-local.rs:5:25 | 5 | #[idle(local = [A], local = [B])] | ^^^^^ diff --git a/macros/ui/idle-double-shared.stderr b/macros/ui/idle-double-shared.stderr index 84864a1560..6f62ad2802 100644 --- a/macros/ui/idle-double-shared.stderr +++ b/macros/ui/idle-double-shared.stderr @@ -1,5 +1,5 @@ error: argument appears more than once - --> $DIR/idle-double-shared.rs:5:26 + --> ui/idle-double-shared.rs:5:26 | 5 | #[idle(shared = [A], shared = [B])] | ^^^^^^ diff --git a/macros/ui/init-divergent.stderr b/macros/ui/init-divergent.stderr index 2d5cc39cf0..9f6acf6742 100644 --- a/macros/ui/init-divergent.stderr +++ b/macros/ui/init-divergent.stderr @@ -1,5 +1,5 @@ -error: the `#[init]` function must have signature `fn(init::Context) -> (Shared resources struct, Local resources struct, init::Monotonics)` - --> $DIR/init-divergent.rs:12:8 +error: the `#[init]` function must have signature `fn(init::Context) -> (Shared resources struct, Local resources struct)` + --> ui/init-divergent.rs:12:8 | 12 | fn init(_: init::Context) -> ! {} | ^^^^ diff --git a/macros/ui/init-double-local.stderr b/macros/ui/init-double-local.stderr index 5ffd2c153a..07c3b50eda 100644 --- a/macros/ui/init-double-local.stderr +++ b/macros/ui/init-double-local.stderr @@ -1,5 +1,5 @@ error: argument appears more than once - --> $DIR/init-double-local.rs:5:25 + --> ui/init-double-local.rs:5:25 | 5 | #[init(local = [A], local = [B])] | ^^^^^ diff --git a/macros/ui/init-double-shared.stderr b/macros/ui/init-double-shared.stderr index b6b1f6da1e..af2a97bc60 100644 --- a/macros/ui/init-double-shared.stderr +++ b/macros/ui/init-double-shared.stderr @@ -1,5 +1,5 @@ error: unexpected argument - --> $DIR/init-double-shared.rs:5:12 + --> ui/init-double-shared.rs:5:12 | 5 | #[init(shared = [A], shared = [B])] | ^^^^^^ diff --git a/macros/ui/init-input.rs b/macros/ui/init-input.rs index ac2a1bdae7..d41a503f51 100644 --- a/macros/ui/init-input.rs +++ b/macros/ui/init-input.rs @@ -9,5 +9,5 @@ mod app { struct Local {} #[init] - fn init(_: init::Context, _undef: u32) -> (Shared, Local, init::Monotonics) {} + fn init(_: init::Context, _undef: u32) -> (Shared, Local) {} } diff --git a/macros/ui/init-input.stderr b/macros/ui/init-input.stderr index 983c46926a..e2360435b4 100644 --- a/macros/ui/init-input.stderr +++ b/macros/ui/init-input.stderr @@ -1,5 +1,5 @@ -error: the `#[init]` function must have signature `fn(init::Context) -> (Shared resources struct, Local resources struct, init::Monotonics)` - --> $DIR/init-input.rs:12:8 +error: the `#[init]` function must have signature `fn(init::Context) -> (Shared resources struct, Local resources struct)` + --> ui/init-input.rs:12:8 | -12 | fn init(_: init::Context, _undef: u32) -> (Shared, Local, init::Monotonics) {} +12 | fn init(_: init::Context, _undef: u32) -> (Shared, Local) {} | ^^^^ diff --git a/macros/ui/init-no-context.rs b/macros/ui/init-no-context.rs index a74093ae3c..cdce4c5566 100644 --- a/macros/ui/init-no-context.rs +++ b/macros/ui/init-no-context.rs @@ -9,5 +9,5 @@ mod app { struct Local {} #[init] - fn init() -> (Shared, Local, init::Monotonics) {} + fn init() -> (Shared, Local) {} } diff --git a/macros/ui/init-no-context.stderr b/macros/ui/init-no-context.stderr index 742e2ab18e..28e1fd4f2d 100644 --- a/macros/ui/init-no-context.stderr +++ b/macros/ui/init-no-context.stderr @@ -1,5 +1,5 @@ -error: the `#[init]` function must have signature `fn(init::Context) -> (Shared resources struct, Local resources struct, init::Monotonics)` - --> $DIR/init-no-context.rs:12:8 +error: the `#[init]` function must have signature `fn(init::Context) -> (Shared resources struct, Local resources struct)` + --> ui/init-no-context.rs:12:8 | -12 | fn init() -> (Shared, Local, init::Monotonics) {} +12 | fn init() -> (Shared, Local) {} | ^^^^ diff --git a/macros/ui/init-output.stderr b/macros/ui/init-output.stderr index 03e982c607..8bc3c83037 100644 --- a/macros/ui/init-output.stderr +++ b/macros/ui/init-output.stderr @@ -1,5 +1,5 @@ -error: the `#[init]` function must have signature `fn(init::Context) -> (Shared resources struct, Local resources struct, init::Monotonics)` - --> $DIR/init-output.rs:6:8 +error: the `#[init]` function must have signature `fn(init::Context) -> (Shared resources struct, Local resources struct)` + --> ui/init-output.rs:6:8 | 6 | fn init(_: init::Context) -> u32 { | ^^^^ diff --git a/macros/ui/init-pub.rs b/macros/ui/init-pub.rs index 43375e4e54..dd59aa1983 100644 --- a/macros/ui/init-pub.rs +++ b/macros/ui/init-pub.rs @@ -9,5 +9,5 @@ mod app { struct Local {} #[init] - pub fn init(_: init::Context) -> (Shared, Local, init::Monotonics) {} + pub fn init(_: init::Context) -> (Shared, Local) {} } diff --git a/macros/ui/init-pub.stderr b/macros/ui/init-pub.stderr index eb68e1ef21..b1610ed74d 100644 --- a/macros/ui/init-pub.stderr +++ b/macros/ui/init-pub.stderr @@ -1,5 +1,5 @@ -error: the `#[init]` function must have signature `fn(init::Context) -> (Shared resources struct, Local resources struct, init::Monotonics)` - --> $DIR/init-pub.rs:12:12 +error: the `#[init]` function must have signature `fn(init::Context) -> (Shared resources struct, Local resources struct)` + --> ui/init-pub.rs:12:12 | -12 | pub fn init(_: init::Context) -> (Shared, Local, init::Monotonics) {} +12 | pub fn init(_: init::Context) -> (Shared, Local) {} | ^^^^ diff --git a/macros/ui/init-unsafe.rs b/macros/ui/init-unsafe.rs index b5d391dd9d..4f89bafa71 100644 --- a/macros/ui/init-unsafe.rs +++ b/macros/ui/init-unsafe.rs @@ -3,5 +3,5 @@ #[rtic_macros::mock_app(device = mock)] mod app { #[init] - unsafe fn init(_: init::Context) -> (Shared, Local, init::Monotonics) {} + unsafe fn init(_: init::Context) -> (Shared, Local) {} } diff --git a/macros/ui/init-unsafe.stderr b/macros/ui/init-unsafe.stderr index 2a48533914..fd0b8f36ff 100644 --- a/macros/ui/init-unsafe.stderr +++ b/macros/ui/init-unsafe.stderr @@ -1,5 +1,5 @@ -error: the `#[init]` function must have signature `fn(init::Context) -> (Shared resources struct, Local resources struct, init::Monotonics)` - --> $DIR/init-unsafe.rs:6:15 +error: the `#[init]` function must have signature `fn(init::Context) -> (Shared resources struct, Local resources struct)` + --> ui/init-unsafe.rs:6:15 | -6 | unsafe fn init(_: init::Context) -> (Shared, Local, init::Monotonics) {} +6 | unsafe fn init(_: init::Context) -> (Shared, Local) {} | ^^^^ diff --git a/macros/ui/interrupt-double.stderr b/macros/ui/interrupt-double.stderr index 62b979bbfa..8db34e2601 100644 --- a/macros/ui/interrupt-double.stderr +++ b/macros/ui/interrupt-double.stderr @@ -1,5 +1,5 @@ error: this interrupt is already bound - --> $DIR/interrupt-double.rs:8:20 + --> ui/interrupt-double.rs:8:20 | 8 | #[task(binds = UART0)] | ^^^^^ diff --git a/macros/ui/local-collision-2.rs b/macros/ui/local-collision-2.rs index 7bd092c845..08bc8e5538 100644 --- a/macros/ui/local-collision-2.rs +++ b/macros/ui/local-collision-2.rs @@ -10,12 +10,9 @@ mod app { a: u32, } - fn bar(_: bar::Context) {} - #[task(local = [a: u8 = 3])] - fn bar(_: bar::Context) {} + async fn bar(_: bar::Context) {} #[init(local = [a: u16 = 2])] - fn init(_: init::Context) -> (Shared, Local, init::Monotonics) {} + fn init(_: init::Context) -> (Shared, Local) {} } - diff --git a/macros/ui/local-collision-2.stderr b/macros/ui/local-collision-2.stderr index 1e4c5fa629..47dbbe336f 100644 --- a/macros/ui/local-collision-2.stderr +++ b/macros/ui/local-collision-2.stderr @@ -1,17 +1,17 @@ error: Local resource "a" is used by multiple tasks or collides with multiple definitions - --> $DIR/local-collision-2.rs:10:9 + --> ui/local-collision-2.rs:10:9 | 10 | a: u32, | ^ error: Local resource "a" is used by multiple tasks or collides with multiple definitions - --> $DIR/local-collision-2.rs:18:21 + --> ui/local-collision-2.rs:16:21 | -18 | #[init(local = [a: u16 = 2])] +16 | #[init(local = [a: u16 = 2])] | ^ error: Local resource "a" is used by multiple tasks or collides with multiple definitions - --> $DIR/local-collision-2.rs:15:21 + --> ui/local-collision-2.rs:13:21 | -15 | #[task(local = [a: u8 = 3])] +13 | #[task(local = [a: u8 = 3])] | ^ diff --git a/macros/ui/local-collision.rs b/macros/ui/local-collision.rs index 7dbe97640f..0e4eef720c 100644 --- a/macros/ui/local-collision.rs +++ b/macros/ui/local-collision.rs @@ -11,11 +11,11 @@ mod app { } #[task(local = [a])] - fn foo(_: foo::Context) {} + async fn foo(_: foo::Context) {} #[task(local = [a: u8 = 3])] - fn bar(_: bar::Context) {} + async fn bar(_: bar::Context) {} #[init] - fn init(_: init::Context) -> (Shared, Local, init::Monotonics) {} + fn init(_: init::Context) -> (Shared, Local) {} } diff --git a/macros/ui/local-collision.stderr b/macros/ui/local-collision.stderr index 1ba1da922d..47fbb6ec23 100644 --- a/macros/ui/local-collision.stderr +++ b/macros/ui/local-collision.stderr @@ -1,11 +1,11 @@ error: Local resource "a" is used by multiple tasks or collides with multiple definitions - --> $DIR/local-collision.rs:10:9 + --> ui/local-collision.rs:10:9 | 10 | a: u32, | ^ error: Local resource "a" is used by multiple tasks or collides with multiple definitions - --> $DIR/local-collision.rs:16:21 + --> ui/local-collision.rs:16:21 | 16 | #[task(local = [a: u8 = 3])] | ^ diff --git a/macros/ui/local-malformed-1.rs b/macros/ui/local-malformed-1.rs index 7efcd9c14a..219eef543c 100644 --- a/macros/ui/local-malformed-1.rs +++ b/macros/ui/local-malformed-1.rs @@ -9,8 +9,8 @@ mod app { struct Local {} #[task(local = [a:])] - fn foo(_: foo::Context) {} + async fn foo(_: foo::Context) {} #[init] - fn init(_: init::Context) -> (Shared, Local, init::Monotonics) {} + fn init(_: init::Context) -> (Shared, Local) {} } diff --git a/macros/ui/local-malformed-2.rs b/macros/ui/local-malformed-2.rs index ce5f891a39..d6914536fd 100644 --- a/macros/ui/local-malformed-2.rs +++ b/macros/ui/local-malformed-2.rs @@ -9,8 +9,8 @@ mod app { struct Local {} #[task(local = [a: u32])] - fn foo(_: foo::Context) {} + async fn foo(_: foo::Context) {} #[init] - fn init(_: init::Context) -> (Shared, Local, init::Monotonics) {} + fn init(_: init::Context) -> (Shared, Local) {} } diff --git a/macros/ui/local-malformed-2.stderr b/macros/ui/local-malformed-2.stderr index ceb04058fe..0b448f01ba 100644 --- a/macros/ui/local-malformed-2.stderr +++ b/macros/ui/local-malformed-2.stderr @@ -2,4 +2,4 @@ error: malformed, expected 'IDENT: TYPE = EXPR' --> ui/local-malformed-2.rs:11:21 | 11 | #[task(local = [a: u32])] - | ^ + | ^^^^^^ diff --git a/macros/ui/local-malformed-3.rs b/macros/ui/local-malformed-3.rs index 935dc2c65d..7eddfa41e0 100644 --- a/macros/ui/local-malformed-3.rs +++ b/macros/ui/local-malformed-3.rs @@ -9,8 +9,8 @@ mod app { struct Local {} #[task(local = [a: u32 =])] - fn foo(_: foo::Context) {} + async fn foo(_: foo::Context) {} #[init] - fn init(_: init::Context) -> (Shared, Local, init::Monotonics) {} + fn init(_: init::Context) -> (Shared, Local) {} } diff --git a/macros/ui/local-malformed-4.rs b/macros/ui/local-malformed-4.rs index 49661b5e8c..b91394763c 100644 --- a/macros/ui/local-malformed-4.rs +++ b/macros/ui/local-malformed-4.rs @@ -9,8 +9,8 @@ mod app { struct Local {} #[task(local = [a = u32])] - fn foo(_: foo::Context) {} + async fn foo(_: foo::Context) {} #[init] - fn init(_: init::Context) -> (Shared, Local, init::Monotonics) {} + fn init(_: init::Context) -> (Shared, Local) {} } diff --git a/macros/ui/local-not-declared.rs b/macros/ui/local-not-declared.rs index 5a38b3d746..7c087e47bb 100644 --- a/macros/ui/local-not-declared.rs +++ b/macros/ui/local-not-declared.rs @@ -9,8 +9,8 @@ mod app { struct Local {} #[task(local = [A])] - fn foo(_: foo::Context) {} + async fn foo(_: foo::Context) {} #[init] - fn init(_: init::Context) -> (Shared, Local, init::Monotonics) {} + fn init(_: init::Context) -> (Shared, Local) {} } diff --git a/macros/ui/local-not-declared.stderr b/macros/ui/local-not-declared.stderr index 540b4bb772..10d4b04bb8 100644 --- a/macros/ui/local-not-declared.stderr +++ b/macros/ui/local-not-declared.stderr @@ -1,5 +1,5 @@ error: this local resource has NOT been declared - --> $DIR/local-not-declared.rs:11:21 + --> ui/local-not-declared.rs:11:21 | 11 | #[task(local = [A])] | ^ diff --git a/macros/ui/local-pub.rs b/macros/ui/local-pub.rs index 8c51754688..42da4f4746 100644 --- a/macros/ui/local-pub.rs +++ b/macros/ui/local-pub.rs @@ -2,8 +2,14 @@ #[rtic_macros::mock_app(device = mock)] mod app { + #[shared] + struct Shared {} + #[local] struct Local { pub x: u32, } + + #[init] + fn init(_: init::Context) -> (Shared, Local) {} } diff --git a/macros/ui/local-pub.stderr b/macros/ui/local-pub.stderr index 041bc598b6..e4814ca080 100644 --- a/macros/ui/local-pub.stderr +++ b/macros/ui/local-pub.stderr @@ -1,5 +1,5 @@ error: this field must have inherited / private visibility - --> $DIR/local-pub.rs:7:13 - | -7 | pub x: u32, - | ^ + --> ui/local-pub.rs:10:13 + | +10 | pub x: u32, + | ^ diff --git a/macros/ui/local-shared-attribute.rs b/macros/ui/local-shared-attribute.rs index 1ccce4ad1b..c594b5f692 100644 --- a/macros/ui/local-shared-attribute.rs +++ b/macros/ui/local-shared-attribute.rs @@ -2,13 +2,20 @@ #[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) { - - } + fn foo(_: foo::Context) {} } diff --git a/macros/ui/local-shared-attribute.stderr b/macros/ui/local-shared-attribute.stderr index 5c15fb5bd6..a8130e8890 100644 --- a/macros/ui/local-shared-attribute.stderr +++ b/macros/ui/local-shared-attribute.stderr @@ -1,5 +1,6 @@ error: attributes are not supported here - --> $DIR/local-shared-attribute.rs:8:9 - | -8 | #[test] - | ^ + --> ui/local-shared-attribute.rs:17:9 + | +17 | / #[test] +18 | | b, // Error + | |_________^ diff --git a/macros/ui/local-shared.rs b/macros/ui/local-shared.rs index f6fb491ae6..4e8f9f4802 100644 --- a/macros/ui/local-shared.rs +++ b/macros/ui/local-shared.rs @@ -12,7 +12,7 @@ mod app { } #[init] - fn init(_: init::Context) -> (Shared, Local, init::Monotonics) {} + fn init(_: init::Context) -> (Shared, Local) {} // l2 ok #[idle(local = [l2])] @@ -20,9 +20,9 @@ mod app { // l1 rejected (not local) #[task(priority = 1, local = [l1])] - fn uart0(cx: uart0::Context) {} + async fn uart0(cx: uart0::Context) {} // l1 rejected (not lock_free) #[task(priority = 2, local = [l1])] - fn uart1(cx: uart1::Context) {} + async fn uart1(cx: uart1::Context) {} } diff --git a/macros/ui/local-shared.stderr b/macros/ui/local-shared.stderr index 0d22db30e3..fceb7630f3 100644 --- a/macros/ui/local-shared.stderr +++ b/macros/ui/local-shared.stderr @@ -1,11 +1,11 @@ error: Local resource "l1" is used by multiple tasks or collides with multiple definitions - --> $DIR/local-shared.rs:22:35 + --> ui/local-shared.rs:22:35 | 22 | #[task(priority = 1, local = [l1])] | ^^ error: Local resource "l1" is used by multiple tasks or collides with multiple definitions - --> $DIR/local-shared.rs:26:35 + --> ui/local-shared.rs:26:35 | 26 | #[task(priority = 2, local = [l1])] | ^^ diff --git a/macros/ui/monotonic-binds-collision-task.rs b/macros/ui/monotonic-binds-collision-task.rs deleted file mode 100644 index 1c58f9ddaf..0000000000 --- a/macros/ui/monotonic-binds-collision-task.rs +++ /dev/null @@ -1,10 +0,0 @@ -#![no_main] - -#[rtic_macros::mock_app(device = mock)] -mod app { - #[monotonic(binds = Tim1)] - type Fast1 = hal::Tim1Monotonic; - - #[task(binds = Tim1)] - fn foo(_: foo::Context) {} -} diff --git a/macros/ui/monotonic-binds-collision-task.stderr b/macros/ui/monotonic-binds-collision-task.stderr deleted file mode 100644 index 8f84986ae1..0000000000 --- a/macros/ui/monotonic-binds-collision-task.stderr +++ /dev/null @@ -1,5 +0,0 @@ -error: this interrupt is already bound - --> $DIR/monotonic-binds-collision-task.rs:8:20 - | -8 | #[task(binds = Tim1)] - | ^^^^ diff --git a/macros/ui/monotonic-binds-collision.rs b/macros/ui/monotonic-binds-collision.rs deleted file mode 100644 index 4e54814588..0000000000 --- a/macros/ui/monotonic-binds-collision.rs +++ /dev/null @@ -1,10 +0,0 @@ -#![no_main] - -#[rtic_macros::mock_app(device = mock)] -mod app { - #[monotonic(binds = Tim1)] - type Fast1 = hal::Tim1Monotonic; - - #[monotonic(binds = Tim1)] - type Fast2 = hal::Tim2Monotonic; -} diff --git a/macros/ui/monotonic-binds-collision.stderr b/macros/ui/monotonic-binds-collision.stderr deleted file mode 100644 index 62b764b254..0000000000 --- a/macros/ui/monotonic-binds-collision.stderr +++ /dev/null @@ -1,5 +0,0 @@ -error: this interrupt is already bound - --> $DIR/monotonic-binds-collision.rs:8:25 - | -8 | #[monotonic(binds = Tim1)] - | ^^^^ diff --git a/macros/ui/monotonic-double-binds.rs b/macros/ui/monotonic-double-binds.rs deleted file mode 100644 index 1705dc4950..0000000000 --- a/macros/ui/monotonic-double-binds.rs +++ /dev/null @@ -1,7 +0,0 @@ -#![no_main] - -#[rtic_macros::mock_app(device = mock)] -mod app { - #[monotonic(binds = Tim1, binds = Tim2)] - type Fast = hal::Tim1Monotonic; -} diff --git a/macros/ui/monotonic-double-binds.stderr b/macros/ui/monotonic-double-binds.stderr deleted file mode 100644 index c7313dfac6..0000000000 --- a/macros/ui/monotonic-double-binds.stderr +++ /dev/null @@ -1,5 +0,0 @@ -error: argument appears more than once - --> $DIR/monotonic-double-binds.rs:5:31 - | -5 | #[monotonic(binds = Tim1, binds = Tim2)] - | ^^^^^ diff --git a/macros/ui/monotonic-double-default.rs b/macros/ui/monotonic-double-default.rs deleted file mode 100644 index dc4eac62a6..0000000000 --- a/macros/ui/monotonic-double-default.rs +++ /dev/null @@ -1,7 +0,0 @@ -#![no_main] - -#[rtic_macros::mock_app(device = mock)] -mod app { - #[monotonic(binds = Tim1, default = true, default = false)] - type Fast = hal::Tim1Monotonic; -} diff --git a/macros/ui/monotonic-double-default.stderr b/macros/ui/monotonic-double-default.stderr deleted file mode 100644 index 9819d04afe..0000000000 --- a/macros/ui/monotonic-double-default.stderr +++ /dev/null @@ -1,5 +0,0 @@ -error: argument appears more than once - --> $DIR/monotonic-double-default.rs:5:47 - | -5 | #[monotonic(binds = Tim1, default = true, default = false)] - | ^^^^^^^ diff --git a/macros/ui/monotonic-double-prio.rs b/macros/ui/monotonic-double-prio.rs deleted file mode 100644 index 4330ddb4f3..0000000000 --- a/macros/ui/monotonic-double-prio.rs +++ /dev/null @@ -1,7 +0,0 @@ -#![no_main] - -#[rtic_macros::mock_app(device = mock)] -mod app { - #[monotonic(binds = Tim1, priority = 1, priority = 2)] - type Fast = hal::Tim1Monotonic; -} diff --git a/macros/ui/monotonic-double-prio.stderr b/macros/ui/monotonic-double-prio.stderr deleted file mode 100644 index fa888e264e..0000000000 --- a/macros/ui/monotonic-double-prio.stderr +++ /dev/null @@ -1,5 +0,0 @@ -error: argument appears more than once - --> $DIR/monotonic-double-prio.rs:5:45 - | -5 | #[monotonic(binds = Tim1, priority = 1, priority = 2)] - | ^^^^^^^^ diff --git a/macros/ui/monotonic-double.rs b/macros/ui/monotonic-double.rs deleted file mode 100644 index 3c43fae8f5..0000000000 --- a/macros/ui/monotonic-double.rs +++ /dev/null @@ -1,10 +0,0 @@ -#![no_main] - -#[rtic_macros::mock_app(device = mock)] -mod app { - #[monotonic(binds = Tim1)] - type Fast = hal::Tim1Monotonic; - - #[monotonic(binds = Tim1)] - type Fast = hal::Tim1Monotonic; -} diff --git a/macros/ui/monotonic-double.stderr b/macros/ui/monotonic-double.stderr deleted file mode 100644 index 9fab84c84e..0000000000 --- a/macros/ui/monotonic-double.stderr +++ /dev/null @@ -1,5 +0,0 @@ -error: `#[monotonic(...)]` on a specific type must appear at most once - --> ui/monotonic-double.rs:9:10 - | -9 | type Fast = hal::Tim1Monotonic; - | ^^^^ diff --git a/macros/ui/monotonic-name-collision.rs b/macros/ui/monotonic-name-collision.rs deleted file mode 100644 index d8d44310de..0000000000 --- a/macros/ui/monotonic-name-collision.rs +++ /dev/null @@ -1,10 +0,0 @@ -#![no_main] - -#[rtic_macros::mock_app(device = mock)] -mod app { - #[monotonic(binds = Tim1)] - type Fast1 = hal::Tim1Monotonic; - - #[monotonic(binds = Tim2)] - type Fast1 = hal::Tim2Monotonic; -} diff --git a/macros/ui/monotonic-name-collision.stderr b/macros/ui/monotonic-name-collision.stderr deleted file mode 100644 index 6557ee5b2d..0000000000 --- a/macros/ui/monotonic-name-collision.stderr +++ /dev/null @@ -1,5 +0,0 @@ -error: `#[monotonic(...)]` on a specific type must appear at most once - --> ui/monotonic-name-collision.rs:9:10 - | -9 | type Fast1 = hal::Tim2Monotonic; - | ^^^^^ diff --git a/macros/ui/monotonic-no-binds.rs b/macros/ui/monotonic-no-binds.rs deleted file mode 100644 index 462d73e1d7..0000000000 --- a/macros/ui/monotonic-no-binds.rs +++ /dev/null @@ -1,7 +0,0 @@ -#![no_main] - -#[rtic_macros::mock_app(device = mock)] -mod app { - #[monotonic()] - type Fast = hal::Tim1Monotonic; -} diff --git a/macros/ui/monotonic-no-binds.stderr b/macros/ui/monotonic-no-binds.stderr deleted file mode 100644 index 0ef7b60522..0000000000 --- a/macros/ui/monotonic-no-binds.stderr +++ /dev/null @@ -1,5 +0,0 @@ -error: `binds = ...` is missing - --> $DIR/monotonic-no-binds.rs:5:17 - | -5 | #[monotonic()] - | ^ diff --git a/macros/ui/monotonic-no-paran.rs b/macros/ui/monotonic-no-paran.rs deleted file mode 100644 index e294bc8595..0000000000 --- a/macros/ui/monotonic-no-paran.rs +++ /dev/null @@ -1,8 +0,0 @@ -#![no_main] - -#[rtic_macros::mock_app(device = mock)] -mod app { - #[monotonic] - type Fast = hal::Tim1Monotonic; -} - diff --git a/macros/ui/monotonic-no-paran.stderr b/macros/ui/monotonic-no-paran.stderr deleted file mode 100644 index c2b32c5c87..0000000000 --- a/macros/ui/monotonic-no-paran.stderr +++ /dev/null @@ -1,5 +0,0 @@ -error: expected opening ( in #[monotonic( ... )] - --> ui/monotonic-no-paran.rs:5:7 - | -5 | #[monotonic] - | ^^^^^^^^^ diff --git a/macros/ui/monotonic-timer-collision.rs b/macros/ui/monotonic-timer-collision.rs deleted file mode 100644 index 5663ad7743..0000000000 --- a/macros/ui/monotonic-timer-collision.rs +++ /dev/null @@ -1,10 +0,0 @@ -#![no_main] - -#[rtic_macros::mock_app(device = mock)] -mod app { - #[monotonic(binds = Tim1)] - type Fast1 = hal::Tim1Monotonic; - - #[monotonic(binds = Tim2)] - type Fast2 = hal::Tim1Monotonic; -} diff --git a/macros/ui/monotonic-timer-collision.stderr b/macros/ui/monotonic-timer-collision.stderr deleted file mode 100644 index 239b96b6ef..0000000000 --- a/macros/ui/monotonic-timer-collision.stderr +++ /dev/null @@ -1,5 +0,0 @@ -error: this type is already used by another monotonic - --> $DIR/monotonic-timer-collision.rs:9:18 - | -9 | type Fast2 = hal::Tim1Monotonic; - | ^^^ diff --git a/macros/ui/monotonic-with-attrs.rs b/macros/ui/monotonic-with-attrs.rs deleted file mode 100644 index 7c63fbbf6d..0000000000 --- a/macros/ui/monotonic-with-attrs.rs +++ /dev/null @@ -1,8 +0,0 @@ -#![no_main] - -#[rtic_macros::mock_app(device = mock)] -mod app { - #[no_mangle] - #[monotonic(binds = Tim1)] - type Fast = hal::Tim1Monotonic; -} diff --git a/macros/ui/monotonic-with-attrs.stderr b/macros/ui/monotonic-with-attrs.stderr deleted file mode 100644 index 62655d872c..0000000000 --- a/macros/ui/monotonic-with-attrs.stderr +++ /dev/null @@ -1,5 +0,0 @@ -error: Monotonic does not support attributes other than `#[cfg]` - --> $DIR/monotonic-with-attrs.rs:5:7 - | -5 | #[no_mangle] - | ^^^^^^^^^ diff --git a/macros/ui/pub-local.stderr b/macros/ui/pub-local.stderr deleted file mode 100644 index dee818ccab..0000000000 --- a/macros/ui/pub-local.stderr +++ /dev/null @@ -1,5 +0,0 @@ -error: this field must have inherited / private visibility - --> $DIR/pub-local.rs:7:13 - | -7 | pub x: u32, - | ^ diff --git a/macros/ui/pub-shared.stderr b/macros/ui/pub-shared.stderr deleted file mode 100644 index 0fdb1ff517..0000000000 --- a/macros/ui/pub-shared.stderr +++ /dev/null @@ -1,5 +0,0 @@ -error: this field must have inherited / private visibility - --> $DIR/pub-shared.rs:7:13 - | -7 | pub x: u32, - | ^ diff --git a/macros/ui/shared-lock-free.rs b/macros/ui/shared-lock-free.rs index c7f8a16d5e..b3a4b9c7e2 100644 --- a/macros/ui/shared-lock-free.rs +++ b/macros/ui/shared-lock-free.rs @@ -17,7 +17,7 @@ mod app { struct Local {} #[init] - fn init(_: init::Context) -> (Shared, Local, init::Monotonics) {} + fn init(_: init::Context) -> (Shared, Local) {} // e2 ok #[idle(shared = [e2])] @@ -27,12 +27,12 @@ mod app { } // e1 rejected (not lock_free) - #[task(priority = 1, shared = [e1])] + #[task(binds = UART0, priority = 1, shared = [e1])] fn uart0(cx: uart0::Context) { *cx.resources.e1 += 10; } // e1 rejected (not lock_free) - #[task(priority = 2, shared = [e1])] + #[task(binds = UART1, priority = 2, shared = [e1])] fn uart1(cx: uart1::Context) {} } diff --git a/macros/ui/shared-lock-free.stderr b/macros/ui/shared-lock-free.stderr deleted file mode 100644 index c6820e8729..0000000000 --- a/macros/ui/shared-lock-free.stderr +++ /dev/null @@ -1,17 +0,0 @@ -error: Lock free shared resource "e1" is used by tasks at different priorities - --> $DIR/shared-lock-free.rs:9:9 - | -9 | e1: u32, - | ^^ - -error: Shared resource "e1" is declared lock free but used by tasks at different priorities - --> $DIR/shared-lock-free.rs:30:36 - | -30 | #[task(priority = 1, shared = [e1])] - | ^^ - -error: Shared resource "e1" is declared lock free but used by tasks at different priorities - --> $DIR/shared-lock-free.rs:36:36 - | -36 | #[task(priority = 2, shared = [e1])] - | ^^ diff --git a/macros/ui/shared-not-declared.rs b/macros/ui/shared-not-declared.rs index aca4178761..5fef5347cb 100644 --- a/macros/ui/shared-not-declared.rs +++ b/macros/ui/shared-not-declared.rs @@ -9,8 +9,8 @@ mod app { struct Local {} #[task(shared = [A])] - fn foo(_: foo::Context) {} + async fn foo(_: foo::Context) {} #[init] - fn init(_: init::Context) -> (Shared, Local, init::Monotonics) {} + fn init(_: init::Context) -> (Shared, Local) {} } diff --git a/macros/ui/shared-not-declared.stderr b/macros/ui/shared-not-declared.stderr index c17425191d..7c5fb32e95 100644 --- a/macros/ui/shared-not-declared.stderr +++ b/macros/ui/shared-not-declared.stderr @@ -1,5 +1,5 @@ error: this shared resource has NOT been declared - --> $DIR/shared-not-declared.rs:11:22 + --> ui/shared-not-declared.rs:11:22 | 11 | #[task(shared = [A])] | ^ diff --git a/macros/ui/shared-pub.stderr b/macros/ui/shared-pub.stderr index 8f761c6be8..71488933d1 100644 --- a/macros/ui/shared-pub.stderr +++ b/macros/ui/shared-pub.stderr @@ -1,5 +1,5 @@ error: this field must have inherited / private visibility - --> $DIR/shared-pub.rs:7:13 + --> ui/shared-pub.rs:7:13 | 7 | pub x: u32, | ^ diff --git a/macros/ui/task-divergent.rs b/macros/ui/task-divergent.rs index 5a471f3cca..ffe2dc0f1c 100644 --- a/macros/ui/task-divergent.rs +++ b/macros/ui/task-divergent.rs @@ -3,7 +3,7 @@ #[rtic_macros::mock_app(device = mock)] mod app { #[task] - fn foo(_: foo::Context) -> ! { + async fn foo(_: foo::Context) -> ! { loop {} } } diff --git a/macros/ui/task-divergent.stderr b/macros/ui/task-divergent.stderr index b25ca5d798..bd22bd3358 100644 --- a/macros/ui/task-divergent.stderr +++ b/macros/ui/task-divergent.stderr @@ -1,5 +1,5 @@ -error: this task handler must have type signature `(async) fn(foo::Context, ..)` - --> ui/task-divergent.rs:6:8 +error: this task handler must have type signature `async fn(foo::Context)` + --> ui/task-divergent.rs:6:14 | -6 | fn foo(_: foo::Context) -> ! { - | ^^^ +6 | async fn foo(_: foo::Context) -> ! { + | ^^^ diff --git a/macros/ui/task-double-capacity.rs b/macros/ui/task-double-capacity.rs deleted file mode 100644 index 806d973146..0000000000 --- a/macros/ui/task-double-capacity.rs +++ /dev/null @@ -1,7 +0,0 @@ -#![no_main] - -#[rtic_macros::mock_app(device = mock)] -mod app { - #[task(capacity = 1, capacity = 2)] - fn foo(_: foo::Context) {} -} diff --git a/macros/ui/task-double-capacity.stderr b/macros/ui/task-double-capacity.stderr deleted file mode 100644 index f73bca5fbf..0000000000 --- a/macros/ui/task-double-capacity.stderr +++ /dev/null @@ -1,5 +0,0 @@ -error: argument appears more than once - --> $DIR/task-double-capacity.rs:5:26 - | -5 | #[task(capacity = 1, capacity = 2)] - | ^^^^^^^^ diff --git a/macros/ui/task-double-local.rs b/macros/ui/task-double-local.rs index 2e465d7c0e..c5277e2bd5 100644 --- a/macros/ui/task-double-local.rs +++ b/macros/ui/task-double-local.rs @@ -3,5 +3,5 @@ #[rtic_macros::mock_app(device = mock)] mod app { #[task(local = [A], local = [B])] - fn foo(_: foo::Context) {} + async fn foo(_: foo::Context) {} } diff --git a/macros/ui/task-double-local.stderr b/macros/ui/task-double-local.stderr index 654ed33328..91ed844647 100644 --- a/macros/ui/task-double-local.stderr +++ b/macros/ui/task-double-local.stderr @@ -1,5 +1,5 @@ error: argument appears more than once - --> $DIR/task-double-local.rs:5:25 + --> ui/task-double-local.rs:5:25 | 5 | #[task(local = [A], local = [B])] | ^^^^^ diff --git a/macros/ui/task-double-priority.rs b/macros/ui/task-double-priority.rs index 0a2ef0ddfc..5c8bd5b1f3 100644 --- a/macros/ui/task-double-priority.rs +++ b/macros/ui/task-double-priority.rs @@ -3,5 +3,5 @@ #[rtic_macros::mock_app(device = mock)] mod app { #[task(priority = 1, priority = 2)] - fn foo(_: foo::Context) {} + async fn foo(_: foo::Context) {} } diff --git a/macros/ui/task-double-priority.stderr b/macros/ui/task-double-priority.stderr index 3d06dc6643..b3c814a997 100644 --- a/macros/ui/task-double-priority.stderr +++ b/macros/ui/task-double-priority.stderr @@ -1,5 +1,5 @@ error: argument appears more than once - --> $DIR/task-double-priority.rs:5:26 + --> ui/task-double-priority.rs:5:26 | 5 | #[task(priority = 1, priority = 2)] | ^^^^^^^^ diff --git a/macros/ui/task-double-shared.rs b/macros/ui/task-double-shared.rs index 3b4d411584..f9812d394a 100644 --- a/macros/ui/task-double-shared.rs +++ b/macros/ui/task-double-shared.rs @@ -3,5 +3,5 @@ #[rtic_macros::mock_app(device = mock)] mod app { #[task(shared = [A], shared = [B])] - fn foo(_: foo::Context) {} + async fn foo(_: foo::Context) {} } diff --git a/macros/ui/task-double-shared.stderr b/macros/ui/task-double-shared.stderr index 6952f06c17..bb90212625 100644 --- a/macros/ui/task-double-shared.stderr +++ b/macros/ui/task-double-shared.stderr @@ -1,5 +1,5 @@ error: argument appears more than once - --> $DIR/task-double-shared.rs:5:26 + --> ui/task-double-shared.rs:5:26 | 5 | #[task(shared = [A], shared = [B])] | ^^^^^^ diff --git a/macros/ui/task-idle.rs b/macros/ui/task-idle.rs index 3be6e282b1..353c7826da 100644 --- a/macros/ui/task-idle.rs +++ b/macros/ui/task-idle.rs @@ -9,5 +9,5 @@ mod app { // name collides with `#[idle]` function #[task] - fn foo(_: foo::Context) {} + async fn foo(_: foo::Context) {} } diff --git a/macros/ui/task-idle.stderr b/macros/ui/task-idle.stderr index ba4fc94c23..4ccc113570 100644 --- a/macros/ui/task-idle.stderr +++ b/macros/ui/task-idle.stderr @@ -1,5 +1,5 @@ error: this identifier has already been used - --> $DIR/task-idle.rs:12:8 + --> ui/task-idle.rs:12:14 | -12 | fn foo(_: foo::Context) {} - | ^^^ +12 | async fn foo(_: foo::Context) {} + | ^^^ diff --git a/macros/ui/task-init.rs b/macros/ui/task-init.rs index bab3805019..e58fdcebe0 100644 --- a/macros/ui/task-init.rs +++ b/macros/ui/task-init.rs @@ -9,9 +9,9 @@ mod app { struct Local {} #[init] - fn foo(_: foo::Context) -> (Shared, Local, foo::Monotonics) {} + fn foo(_: foo::Context) -> (Shared, Local) {} // name collides with `#[idle]` function #[task] - fn foo(_: foo::Context) {} + async fn foo(_: foo::Context) {} } diff --git a/macros/ui/task-init.stderr b/macros/ui/task-init.stderr index 911af37f12..161e1943cb 100644 --- a/macros/ui/task-init.stderr +++ b/macros/ui/task-init.stderr @@ -1,5 +1,5 @@ error: this identifier has already been used - --> $DIR/task-init.rs:16:8 + --> ui/task-init.rs:16:14 | -16 | fn foo(_: foo::Context) {} - | ^^^ +16 | async fn foo(_: foo::Context) {} + | ^^^ diff --git a/macros/ui/task-interrupt.rs b/macros/ui/task-interrupt.rs index 5e063def3b..3d50bd8340 100644 --- a/macros/ui/task-interrupt.rs +++ b/macros/ui/task-interrupt.rs @@ -6,5 +6,5 @@ mod app { fn foo(_: foo::Context) {} #[task] - fn foo(_: foo::Context) {} + async fn foo(_: foo::Context) {} } diff --git a/macros/ui/task-interrupt.stderr b/macros/ui/task-interrupt.stderr index 6efb0f9966..087b6c6eb5 100644 --- a/macros/ui/task-interrupt.stderr +++ b/macros/ui/task-interrupt.stderr @@ -1,5 +1,5 @@ error: this task is defined multiple times - --> $DIR/task-interrupt.rs:9:8 + --> ui/task-interrupt.rs:9:14 | -9 | fn foo(_: foo::Context) {} - | ^^^ +9 | async fn foo(_: foo::Context) {} + | ^^^ diff --git a/macros/ui/task-no-context.rs b/macros/ui/task-no-context.rs index e2da625417..55e8c3b48e 100644 --- a/macros/ui/task-no-context.rs +++ b/macros/ui/task-no-context.rs @@ -3,5 +3,5 @@ #[rtic_macros::mock_app(device = mock)] mod app { #[task] - fn foo() {} + async fn foo() {} } diff --git a/macros/ui/task-no-context.stderr b/macros/ui/task-no-context.stderr index 8bf3438b52..91239a17b0 100644 --- a/macros/ui/task-no-context.stderr +++ b/macros/ui/task-no-context.stderr @@ -1,5 +1,5 @@ -error: this task handler must have type signature `(async) fn(foo::Context, ..)` - --> ui/task-no-context.rs:6:8 +error: this task handler must have type signature `async fn(foo::Context)` + --> ui/task-no-context.rs:6:14 | -6 | fn foo() {} - | ^^^ +6 | async fn foo() {} + | ^^^ diff --git a/macros/ui/task-priority-too-high.rs b/macros/ui/task-priority-too-high.rs index 8c32bebaa3..f33ba5699d 100644 --- a/macros/ui/task-priority-too-high.rs +++ b/macros/ui/task-priority-too-high.rs @@ -3,5 +3,5 @@ #[rtic_macros::mock_app(device = mock)] mod app { #[task(priority = 256)] - fn foo(_: foo::Context) {} + async fn foo(_: foo::Context) {} } diff --git a/macros/ui/task-pub.rs b/macros/ui/task-pub.rs index 3cbd523413..1ae533f6c0 100644 --- a/macros/ui/task-pub.rs +++ b/macros/ui/task-pub.rs @@ -3,5 +3,5 @@ #[rtic_macros::mock_app(device = mock)] mod app { #[task] - pub fn foo(_: foo::Context) {} + pub async fn foo(_: foo::Context) {} } diff --git a/macros/ui/task-pub.stderr b/macros/ui/task-pub.stderr index 56e09b11d9..72c4e637d1 100644 --- a/macros/ui/task-pub.stderr +++ b/macros/ui/task-pub.stderr @@ -1,5 +1,5 @@ -error: this task handler must have type signature `(async) fn(foo::Context, ..)` - --> ui/task-pub.rs:6:12 +error: this task handler must have type signature `async fn(foo::Context)` + --> ui/task-pub.rs:6:18 | -6 | pub fn foo(_: foo::Context) {} - | ^^^ +6 | pub async fn foo(_: foo::Context) {} + | ^^^ diff --git a/macros/ui/task-unsafe.rs b/macros/ui/task-unsafe.rs index 44255f02b5..a8383ef425 100644 --- a/macros/ui/task-unsafe.rs +++ b/macros/ui/task-unsafe.rs @@ -3,5 +3,5 @@ #[rtic_macros::mock_app(device = mock)] mod app { #[task] - unsafe fn foo(_: foo::Context) {} + async unsafe fn foo(_: foo::Context) {} } diff --git a/macros/ui/task-unsafe.stderr b/macros/ui/task-unsafe.stderr index 424c5af323..4908481311 100644 --- a/macros/ui/task-unsafe.stderr +++ b/macros/ui/task-unsafe.stderr @@ -1,5 +1,5 @@ -error: this task handler must have type signature `(async) fn(foo::Context, ..)` - --> ui/task-unsafe.rs:6:15 +error: this task handler must have type signature `async fn(foo::Context)` + --> ui/task-unsafe.rs:6:21 | -6 | unsafe fn foo(_: foo::Context) {} - | ^^^ +6 | async unsafe fn foo(_: foo::Context) {} + | ^^^ diff --git a/macros/ui/async-zero-prio-tasks.rs b/macros/ui/task-zero-prio.rs similarity index 78% rename from macros/ui/async-zero-prio-tasks.rs rename to macros/ui/task-zero-prio.rs index 91e0990a8b..de3c86fc8e 100644 --- a/macros/ui/async-zero-prio-tasks.rs +++ b/macros/ui/task-zero-prio.rs @@ -9,7 +9,7 @@ mod app { struct Local {} #[init] - fn init(_: init::Context) -> (Shared, Local, init::Monotonics) {} + fn init(_: init::Context) -> (Shared, Local) {} #[task(priority = 0)] fn foo(_: foo::Context) {} diff --git a/macros/ui/task-zero-prio.stderr b/macros/ui/task-zero-prio.stderr new file mode 100644 index 0000000000..f2d82231e3 --- /dev/null +++ b/macros/ui/task-zero-prio.stderr @@ -0,0 +1,5 @@ +error: this task handler must have type signature `async fn(foo::Context)` + --> ui/task-zero-prio.rs:15:8 + | +15 | fn foo(_: foo::Context) {} + | ^^^