mirror of
https://github.com/rtic-rs/rtic.git
synced 2025-12-16 12:55:23 +01:00
update parser
closes #69 this doesn't change functionality per se but improves diagnostics in some cases. Some hard errors have becomes warnings, for example: when `resources` is empty, or when `idle.path` is set to the default `idle` path.
This commit is contained in:
parent
b55581dfe3
commit
7fdf16eab9
13 changed files with 61 additions and 139 deletions
|
|
@ -19,8 +19,8 @@ app! { //~ proc macro panicked
|
|||
},
|
||||
|
||||
idle: {
|
||||
// ERROR resources assigned to `init` can't be shared with `idle`
|
||||
resources: [BUFFER],
|
||||
//~^ error: this resource is owned by `init` and can't be shared
|
||||
},
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -21,8 +21,8 @@ app! { //~ proc macro panicked
|
|||
tasks: {
|
||||
SYS_TICK: {
|
||||
path: sys_tick,
|
||||
// ERROR resources assigned to `init` can't be shared with tasks
|
||||
resources: [BUFFER],
|
||||
//~^ error: this resource is owned by `init` and can't be shared
|
||||
},
|
||||
},
|
||||
}
|
||||
|
|
|
|||
|
|
@ -8,12 +8,10 @@ extern crate stm32f103xx;
|
|||
|
||||
use rtfm::app;
|
||||
|
||||
app! {
|
||||
//~^ error no variant named `EXTI33` found for type
|
||||
app! { //~ error no variant named `EXTI33` found for type
|
||||
device: stm32f103xx,
|
||||
|
||||
tasks: {
|
||||
// ERROR this interrupt doesn't exist
|
||||
EXTI33: {
|
||||
path: exti33,
|
||||
},
|
||||
|
|
|
|||
|
|
@ -9,6 +9,7 @@ extern crate stm32f103xx;
|
|||
use rtfm::app;
|
||||
|
||||
app! { //~ error attempt to subtract with overflow
|
||||
//~^ error constant evaluation error
|
||||
device: stm32f103xx,
|
||||
|
||||
tasks: {
|
||||
|
|
|
|||
|
|
@ -9,6 +9,7 @@ extern crate stm32f103xx;
|
|||
use rtfm::app;
|
||||
|
||||
app! { //~ error attempt to subtract with overflow
|
||||
//~^ error constant evaluation error
|
||||
device: stm32f103xx,
|
||||
|
||||
tasks: {
|
||||
|
|
|
|||
|
|
@ -7,7 +7,7 @@
|
|||
extern crate cortex_m_rtfm as rtfm;
|
||||
extern crate stm32f103xx;
|
||||
|
||||
use rtfm::{app, Resource, Threshold};
|
||||
use rtfm::{app, Threshold};
|
||||
|
||||
app! {
|
||||
device: stm32f103xx,
|
||||
|
|
@ -43,7 +43,7 @@ fn is_sync<T>(_: &T) where T: Sync {}
|
|||
fn exti0(_t: &mut Threshold, r: EXTI0::Resources) {
|
||||
// ERROR resource proxies can't be shared between tasks
|
||||
is_sync(&r.SHARED);
|
||||
//~^ error the trait bound `*const (): core::marker::Sync` is not satisfied
|
||||
//~^ error `*const ()` cannot be shared between threads safely
|
||||
|
||||
// ERROR resource proxies are not `Send`able across tasks
|
||||
is_send(&r.SHARED);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue