diff --git a/ui/single/exception-invalid.rs b/ui/single/exception-invalid.rs index efe0621243..9b6b0016d4 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 36ed1744b1..02fd1c6bca 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 53820b52ae..18850d8ace 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 82f1bdd22a..dd798431a4 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 54bba8aefd..5053cf38c1 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 bb558fa60e..e572a418a1 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`. - | - = note: first defined in crate `std`. - error: duplicate lang item in crate `panic_semihosting`: `panic_impl`. | - = note: first defined in crate `panic_halt`. + = note: first defined in crate `std` (which `$CRATE` depends on) + +error: duplicate lang item in crate `panic_halt`: `panic_impl`. + | + = note: first defined in crate `panic_semihosting`. diff --git a/ui/single/resources-cfg.rs b/ui/single/resources-cfg.rs index df7ac80605..fd03f58536 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 539c3f5d0e..ed7dd8696c 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 eae6074df9..5854ae5f5b 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