mirror of
https://github.com/rtic-rs/rtic.git
synced 2025-12-17 21:35:20 +01:00
Fix zero prio tasks when all async tasks have default (no) arguments
This commit is contained in:
parent
cfac6d1d90
commit
67d5ade4fd
10 changed files with 33 additions and 17 deletions
19
rtic-macros/ui/task-no-prio.rs
Normal file
19
rtic-macros/ui/task-no-prio.rs
Normal 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) {}
|
||||
}
|
||||
5
rtic-macros/ui/task-no-prio.stderr
Normal file
5
rtic-macros/ui/task-no-prio.stderr
Normal 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) {}
|
||||
| ^^^^^
|
||||
Loading…
Add table
Add a link
Reference in a new issue