diff options
author | 2020-04-22 11:48:36 +0000 | |
---|---|---|
committer | 2020-09-25 14:29:34 +0000 | |
commit | 79b62797f549a71531bf5ede39cc6695871b7251 (patch) | |
tree | 2e739d834b62e747c46ed7ddd7878fa3b4048086 | |
parent | 8df2ec11b0ee3209678dcc1b1a5baa479fa1dfe5 (diff) | |
download | rtic-79b62797f549a71531bf5ede39cc6695871b7251.tar.gz rtic-79b62797f549a71531bf5ede39cc6695871b7251.tar.zst rtic-79b62797f549a71531bf5ede39cc6695871b7251.zip |
Update the test suite to use mod instead of const
Changes MSRV to 1.42, failing tests updated to match 1.42.
-rw-r--r-- | ui/single/exception-invalid.rs | 4 | ||||
-rw-r--r-- | ui/single/exception-systick-used.rs | 4 | ||||
-rw-r--r-- | ui/single/extern-interrupt-not-enough.rs | 4 | ||||
-rw-r--r-- | ui/single/extern-interrupt-used.rs | 4 | ||||
-rw-r--r-- | ui/single/locals-cfg.rs | 4 | ||||
-rw-r--r-- | ui/single/locals-cfg.stderr | 8 | ||||
-rw-r--r-- | ui/single/resources-cfg.rs | 4 | ||||
-rw-r--r-- | ui/single/task-priority-too-high.rs | 4 | ||||
-rw-r--r-- | ui/single/task-priority-too-high.stderr | 2 |
9 files changed, 19 insertions, 19 deletions
diff --git a/ui/single/exception-invalid.rs b/ui/single/exception-invalid.rs index efe06212..9b6b0016 100644 --- a/ui/single/exception-invalid.rs +++ b/ui/single/exception-invalid.rs @@ -1,7 +1,7 @@ #![no_main] #[rtic::app(device = lm3s6965)] -const APP: () = { +mod APP { #[task(binds = NonMaskableInt)] fn nmi(_: nmi::Context) {} -}; +} diff --git a/ui/single/exception-systick-used.rs b/ui/single/exception-systick-used.rs index 36ed1744..02fd1c6b 100644 --- a/ui/single/exception-systick-used.rs +++ b/ui/single/exception-systick-used.rs @@ -1,10 +1,10 @@ #![no_main] #[rtic::app(device = lm3s6965)] -const APP: () = { +mod APP { #[task(binds = SysTick)] fn sys_tick(_: sys_tick::Context) {} #[task(schedule = [foo])] fn foo(_: foo::Context) {} -}; +} diff --git a/ui/single/extern-interrupt-not-enough.rs b/ui/single/extern-interrupt-not-enough.rs index 53820b52..18850d8a 100644 --- a/ui/single/extern-interrupt-not-enough.rs +++ b/ui/single/extern-interrupt-not-enough.rs @@ -1,7 +1,7 @@ #![no_main] #[rtic::app(device = lm3s6965)] -const APP: () = { +mod APP { #[task] fn a(_: a::Context) {} -}; +} diff --git a/ui/single/extern-interrupt-used.rs b/ui/single/extern-interrupt-used.rs index 82f1bdd2..dd798431 100644 --- a/ui/single/extern-interrupt-used.rs +++ b/ui/single/extern-interrupt-used.rs @@ -1,11 +1,11 @@ #![no_main] #[rtic::app(device = lm3s6965)] -const APP: () = { +mod APP { #[task(binds = UART0)] fn a(_: a::Context) {} extern "C" { fn UART0(); } -}; +} diff --git a/ui/single/locals-cfg.rs b/ui/single/locals-cfg.rs index 54bba8ae..5053cf38 100644 --- a/ui/single/locals-cfg.rs +++ b/ui/single/locals-cfg.rs @@ -1,7 +1,7 @@ #![no_main] #[rtic::app(device = lm3s6965)] -const APP: () = { +mod APP { #[init] fn init(_: init::Context) { #[cfg(never)] @@ -47,4 +47,4 @@ const APP: () = { extern "C" { fn UART1(); } -}; +} diff --git a/ui/single/locals-cfg.stderr b/ui/single/locals-cfg.stderr index bb558fa6..e572a418 100644 --- a/ui/single/locals-cfg.stderr +++ b/ui/single/locals-cfg.stderr @@ -28,10 +28,10 @@ error[E0425]: cannot find value `FOO` in this scope 44 | FOO; | ^^^ not found in this scope -error: duplicate lang item in crate `panic_halt`: `panic_impl`. +error: duplicate lang item in crate `panic_semihosting`: `panic_impl`. | - = note: first defined in crate `std`. + = note: first defined in crate `std` (which `$CRATE` depends on) -error: duplicate lang item in crate `panic_semihosting`: `panic_impl`. +error: duplicate lang item in crate `panic_halt`: `panic_impl`. | - = note: first defined in crate `panic_halt`. + = note: first defined in crate `panic_semihosting`. diff --git a/ui/single/resources-cfg.rs b/ui/single/resources-cfg.rs index df7ac806..fd03f585 100644 --- a/ui/single/resources-cfg.rs +++ b/ui/single/resources-cfg.rs @@ -1,7 +1,7 @@ #![no_main] #[rtic::app(device = lm3s6965)] -const APP: () = { +mod APP { struct Resources { #[cfg(never)] #[init(0)] @@ -72,4 +72,4 @@ const APP: () = { c.resources.s2; c.resources.o5; } -}; +} diff --git a/ui/single/task-priority-too-high.rs b/ui/single/task-priority-too-high.rs index 539c3f5d..ed7dd869 100644 --- a/ui/single/task-priority-too-high.rs +++ b/ui/single/task-priority-too-high.rs @@ -3,7 +3,7 @@ use rtic::app; #[rtic::app(device = lm3s6965)] -const APP: () = { +mod APP { #[init] fn init(_: init::Context) {} @@ -35,4 +35,4 @@ const APP: () = { // this value is too high! #[task(binds = I2C0, priority = 9)] fn i2c0(_: i2c0::Context) {} -}; +} diff --git a/ui/single/task-priority-too-high.stderr b/ui/single/task-priority-too-high.stderr index eae6074d..5854ae5f 100644 --- a/ui/single/task-priority-too-high.stderr +++ b/ui/single/task-priority-too-high.stderr @@ -4,7 +4,7 @@ warning: unused import: `rtic::app` 3 | use rtic::app; | ^^^^^^^^^ | - = note: #[warn(unused_imports)] on by default + = note: `#[warn(unused_imports)]` on by default error[E0080]: evaluation of constant value failed --> $DIR/task-priority-too-high.rs:5:1 |