mirror of
https://github.com/rtic-rs/rtic.git
synced 2024-11-27 14:04:56 +01:00
Update the test suite to use mod instead of const
Changes MSRV to 1.42, failing tests updated to match 1.42.
This commit is contained in:
parent
8df2ec11b0
commit
79b62797f5
9 changed files with 20 additions and 20 deletions
|
@ -1,7 +1,7 @@
|
|||
#![no_main]
|
||||
|
||||
#[rtic::app(device = lm3s6965)]
|
||||
const APP: () = {
|
||||
mod APP {
|
||||
#[task(binds = NonMaskableInt)]
|
||||
fn nmi(_: nmi::Context) {}
|
||||
};
|
||||
}
|
||||
|
|
|
@ -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) {}
|
||||
};
|
||||
}
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
#![no_main]
|
||||
|
||||
#[rtic::app(device = lm3s6965)]
|
||||
const APP: () = {
|
||||
mod APP {
|
||||
#[task]
|
||||
fn a(_: a::Context) {}
|
||||
};
|
||||
}
|
||||
|
|
|
@ -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();
|
||||
}
|
||||
};
|
||||
}
|
||||
|
|
|
@ -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();
|
||||
}
|
||||
};
|
||||
}
|
||||
|
|
|
@ -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`.
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
};
|
||||
}
|
||||
|
|
|
@ -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) {}
|
||||
};
|
||||
}
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue