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:
Henrik Tjäder 2020-04-22 11:48:36 +00:00
parent 8df2ec11b0
commit 79b62797f5
9 changed files with 20 additions and 20 deletions

View file

@ -1,7 +1,7 @@
#![no_main]
#[rtic::app(device = lm3s6965)]
const APP: () = {
mod APP {
#[task(binds = NonMaskableInt)]
fn nmi(_: nmi::Context) {}
};
}

View file

@ -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) {}
};
}

View file

@ -1,7 +1,7 @@
#![no_main]
#[rtic::app(device = lm3s6965)]
const APP: () = {
mod APP {
#[task]
fn a(_: a::Context) {}
};
}

View file

@ -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();
}
};
}

View file

@ -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();
}
};
}

View file

@ -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`.

View file

@ -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;
}
};
}

View file

@ -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) {}
};
}

View file

@ -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