From 671bc7f32fd150f04793d8d5dbe806e9d4cfe669 Mon Sep 17 00:00:00 2001 From: René Kijewski Date: Tue, 30 Nov 2021 13:54:29 +0100 Subject: Fix tests for new error messages in Rust nightly --- testing/tests/ui.rs | 18 ++++++++++++++---- 1 file changed, 14 insertions(+), 4 deletions(-) (limited to 'testing/tests/ui.rs') diff --git a/testing/tests/ui.rs b/testing/tests/ui.rs index 39a0b78..33848b2 100644 --- a/testing/tests/ui.rs +++ b/testing/tests/ui.rs @@ -6,9 +6,19 @@ fn ui() { let t = TestCases::new(); t.compile_fail("tests/ui/*.rs"); - if rustc::is_min_version("1.54").unwrap() { - t.compile_fail("tests/ui/since_1_54/*.rs"); - } else { - t.compile_fail("tests/ui/before_1_54/*.rs"); + if rustc::is_min_version("1.58").unwrap() { + t.compile_fail("tests/ui/since_1.58/*.rs"); + } + + if rustc::is_max_version("1.57").unwrap() { + t.compile_fail("tests/ui/before_1.58/*.rs"); + } + + if rustc::is_min_version("1.54").unwrap() && rustc::is_max_version("1.57").unwrap() { + t.compile_fail("tests/ui/1.54_to_1.57/*.rs"); + } + + if rustc::is_max_version("1.53").unwrap() { + t.compile_fail("tests/ui/before_1.54/*.rs"); } } -- cgit