Fix zero prio tasks when all async tasks have default (no) arguments

This commit is contained in:
Emil Fresk 2023-05-10 14:24:32 +02:00
parent cfac6d1d90
commit 67d5ade4fd
10 changed files with 33 additions and 17 deletions

View file

@ -0,0 +1,19 @@
#![no_main]
#[rtic_macros::mock_app(device = mock)]
mod app {
#[shared]
struct Shared {}
#[local]
struct Local {}
#[init]
fn init(_: init::Context) -> (Shared, Local) {}
#[idle]
fn idle(_: idle::Context) -> ! {}
#[task]
async fn task1(_: task1::Context) {}
}

View file

@ -0,0 +1,5 @@
error: Async task "task1" has priority 0, but `#[idle]` is defined. 0-priority async tasks are only allowed if there is no `#[idle]`.
--> ui/task-no-prio.rs:18:14
|
18 | async fn task1(_: task1::Context) {}
| ^^^^^