diff options
| author | bors[bot] <bors[bot]@users.noreply.github.com> | 2018-04-16 19:44:27 +0000 |
|---|---|---|
| committer | bors[bot] <bors[bot]@users.noreply.github.com> | 2018-04-16 19:44:27 +0000 |
| commit | 5ff9076e9c1a5cc2e9b57041699d0aa37ca8c768 (patch) | |
| tree | 4169f3ae1a774a189b90baeefb1e1c3aaa0b5a44 /tests | |
| parent | b55581dfe35040a4fdc93a1f38c1e1769d4d2535 (diff) | |
| parent | bfa56e12f7a3ec3734e329f00d98ce9a953fce6d (diff) | |
Merge #71
71: update parser r=japaric a=japaric
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.
Co-authored-by: Jorge Aparicio <jorge@japaric.io>
Diffstat (limited to 'tests')
| -rw-r--r-- | tests/cfail.rs | 5 | ||||
| -rw-r--r-- | tests/cfail/init-resource-share-idle.rs | 2 | ||||
| -rw-r--r-- | tests/cfail/init-resource-share-task.rs | 2 | ||||
| -rw-r--r-- | tests/cfail/interrupt.rs | 4 | ||||
| -rw-r--r-- | tests/cfail/priority-too-high.rs | 1 | ||||
| -rw-r--r-- | tests/cfail/priority-too-low.rs | 1 | ||||
| -rw-r--r-- | tests/cfail/resource-not-send-sync.rs | 4 |
7 files changed, 9 insertions, 10 deletions
diff --git a/tests/cfail.rs b/tests/cfail.rs index 3636c72..6572d65 100644 --- a/tests/cfail.rs +++ b/tests/cfail.rs @@ -10,9 +10,8 @@ fn cfail() { let mut config = Config::default(); config.mode = Mode::CompileFail; config.src_base = PathBuf::from(format!("tests/cfail")); - config.target_rustcflags = Some( - "-C panic=abort -L target/debug -L target/debug/deps ".to_string(), - ); + config.target_rustcflags = + Some("-C panic=abort -L target/debug -L target/debug/deps ".to_string()); compiletest::run_tests(&config); } diff --git a/tests/cfail/init-resource-share-idle.rs b/tests/cfail/init-resource-share-idle.rs index d833246..4e2ed4a 100644 --- a/tests/cfail/init-resource-share-idle.rs +++ b/tests/cfail/init-resource-share-idle.rs @@ -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 }, } diff --git a/tests/cfail/init-resource-share-task.rs b/tests/cfail/init-resource-share-task.rs index 8fe6889..391c543 100644 --- a/tests/cfail/init-resource-share-task.rs +++ b/tests/cfail/init-resource-share-task.rs @@ -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 }, }, } diff --git a/tests/cfail/interrupt.rs b/tests/cfail/interrupt.rs index e3ef2e8..7c345a1 100644 --- a/tests/cfail/interrupt.rs +++ b/tests/cfail/interrupt.rs @@ -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, }, diff --git a/tests/cfail/priority-too-high.rs b/tests/cfail/priority-too-high.rs index 5c35377..15f6b7a 100644 --- a/tests/cfail/priority-too-high.rs +++ b/tests/cfail/priority-too-high.rs @@ -9,6 +9,7 @@ extern crate stm32f103xx; use rtfm::app; app! { //~ error attempt to subtract with overflow + //~^ error constant evaluation error device: stm32f103xx, tasks: { diff --git a/tests/cfail/priority-too-low.rs b/tests/cfail/priority-too-low.rs index 2be2254..e879511 100644 --- a/tests/cfail/priority-too-low.rs +++ b/tests/cfail/priority-too-low.rs @@ -9,6 +9,7 @@ extern crate stm32f103xx; use rtfm::app; app! { //~ error attempt to subtract with overflow + //~^ error constant evaluation error device: stm32f103xx, tasks: { diff --git a/tests/cfail/resource-not-send-sync.rs b/tests/cfail/resource-not-send-sync.rs index 775c78a..60a20db 100644 --- a/tests/cfail/resource-not-send-sync.rs +++ b/tests/cfail/resource-not-send-sync.rs @@ -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); |
