From 31b392fe3a6961596a0bd4e1bb24c0da2a9b7b42 Mon Sep 17 00:00:00 2001 From: Jorge Aparicio Date: Wed, 6 Nov 2019 19:05:37 -0500 Subject: CI: replace compiletest-rs with trybuild We use compiletest to run compile-fail tests but compiletest depends on compiler internals so it breaks every now and then and requires nightly. With trybuild we can also run compile-fail tests but it works on stable and it already has reached version 1.0 --- ui/single/exception-invalid.stderr | 3 --- ui/single/exception-systick-used.stderr | 3 --- ui/single/extern-interrupt-not-enough.stderr | 3 --- ui/single/extern-interrupt-used.stderr | 3 --- ui/single/locals-cfg.stderr | 8 ++++++-- ui/single/resources-cfg.stderr | 4 ---- ui/single/task-priority-too-high.stderr | 12 ++++++++---- 7 files changed, 14 insertions(+), 22 deletions(-) (limited to 'ui/single') diff --git a/ui/single/exception-invalid.stderr b/ui/single/exception-invalid.stderr index 306074b..9021376 100644 --- a/ui/single/exception-invalid.stderr +++ b/ui/single/exception-invalid.stderr @@ -3,6 +3,3 @@ error: only exceptions with configurable priority can be used as hardware tasks | 6 | fn nmi(_: nmi::Context) {} | ^^^ - -error: aborting due to previous error - diff --git a/ui/single/exception-systick-used.stderr b/ui/single/exception-systick-used.stderr index e2ccbd3..23b6dc4 100644 --- a/ui/single/exception-systick-used.stderr +++ b/ui/single/exception-systick-used.stderr @@ -3,6 +3,3 @@ error: this exception can't be used because it's being used by the runtime | 6 | fn sys_tick(_: sys_tick::Context) {} | ^^^^^^^^ - -error: aborting due to previous error - diff --git a/ui/single/extern-interrupt-not-enough.stderr b/ui/single/extern-interrupt-not-enough.stderr index 43249c4..73ce7ad 100644 --- a/ui/single/extern-interrupt-not-enough.stderr +++ b/ui/single/extern-interrupt-not-enough.stderr @@ -3,6 +3,3 @@ error: not enough `extern` interrupts to dispatch all software tasks (need: 1; g | 6 | fn a(_: a::Context) {} | ^ - -error: aborting due to previous error - diff --git a/ui/single/extern-interrupt-used.stderr b/ui/single/extern-interrupt-used.stderr index 2e084ca..fb0ff5b 100644 --- a/ui/single/extern-interrupt-used.stderr +++ b/ui/single/extern-interrupt-used.stderr @@ -3,6 +3,3 @@ error: `extern` interrupts can't be used as hardware tasks | 5 | #[task(binds = UART0)] | ^^^^^ - -error: aborting due to previous error - diff --git a/ui/single/locals-cfg.stderr b/ui/single/locals-cfg.stderr index fc324f1..bb558fa 100644 --- a/ui/single/locals-cfg.stderr +++ b/ui/single/locals-cfg.stderr @@ -28,6 +28,10 @@ error[E0425]: cannot find value `FOO` in this scope 44 | FOO; | ^^^ not found in this scope -error: aborting due to 5 previous errors +error: duplicate lang item in crate `panic_halt`: `panic_impl`. + | + = note: first defined in crate `std`. -For more information about this error, try `rustc --explain E0425`. +error: duplicate lang item in crate `panic_semihosting`: `panic_impl`. + | + = note: first defined in crate `panic_halt`. diff --git a/ui/single/resources-cfg.stderr b/ui/single/resources-cfg.stderr index a745e6e..c47b95d 100644 --- a/ui/single/resources-cfg.stderr +++ b/ui/single/resources-cfg.stderr @@ -117,7 +117,3 @@ error[E0609]: no field `o5` on type `uart1Resources<'_>` | ^^ unknown field | = note: available fields are: `__marker__` - -error: aborting due to 15 previous errors - -For more information about this error, try `rustc --explain E0609`. diff --git a/ui/single/task-priority-too-high.stderr b/ui/single/task-priority-too-high.stderr index b402a95..0e0b1cb 100644 --- a/ui/single/task-priority-too-high.stderr +++ b/ui/single/task-priority-too-high.stderr @@ -1,9 +1,13 @@ +warning: unused import: `rtfm::app` + --> $DIR/task-priority-too-high.rs:3:5 + | +3 | use rtfm::app; + | ^^^^^^^^^ + | + = note: `#[warn(unused_imports)]` on by default + error[E0080]: evaluation of constant value failed --> $DIR/task-priority-too-high.rs:5:1 | 5 | #[rtfm::app(device = lm3s6965)] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ attempt to subtract with overflow - -error: aborting due to previous error - -For more information about this error, try `rustc --explain E0080`. -- cgit v1.2.3 From da9c6a714eaa9420694dc6377c6e0167fe08f5d4 Mon Sep 17 00:00:00 2001 From: Jorge Aparicio Date: Wed, 6 Nov 2019 19:39:57 -0500 Subject: run cfail tests only when rustc --version == $MSRV this version is more or less fixed so new releases of Rust (stable or nightly channel) are unlikely to break to build due to changes in diagnostic messages --- ui/single/task-priority-too-high.stderr | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'ui/single') diff --git a/ui/single/task-priority-too-high.stderr b/ui/single/task-priority-too-high.stderr index 0e0b1cb..98b5d65 100644 --- a/ui/single/task-priority-too-high.stderr +++ b/ui/single/task-priority-too-high.stderr @@ -4,7 +4,7 @@ warning: unused import: `rtfm::app` 3 | use rtfm::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 -- cgit v1.2.3