From da9c6a714eaa9420694dc6377c6e0167fe08f5d4 Mon Sep 17 00:00:00 2001 From: Jorge Aparicio Date: Wed, 6 Nov 2019 19:39:57 -0500 Subject: [PATCH] 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 --- ci/script.sh | 7 +++++-- ui/single/task-priority-too-high.stderr | 2 +- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/ci/script.sh b/ci/script.sh index 5c898a8668..e87e50a8db 100644 --- a/ci/script.sh +++ b/ci/script.sh @@ -37,8 +37,11 @@ main() { mkdir -p ci/builds if [ $T = x86_64-unknown-linux-gnu ]; then - # compile-fail tests - cargo test --test single --target $T + if [ $TRAVIS_RUST_VERSION == 1.*.* ]; then + # test on a fixed version (MSRV) to avoid problems with changes in rustc diagnostics + # compile-fail tests + cargo test --test single --target $T + fi if [ $TRAVIS_RUST_VERSION = nightly ]; then # multi-core compile-pass tests diff --git a/ui/single/task-priority-too-high.stderr b/ui/single/task-priority-too-high.stderr index 0e0b1cb26e..98b5d657c9 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