diff options
author | René Kijewski <kijewski@library.vetmed.fu-berlin.de> | 2021-07-02 15:54:17 +0200 |
---|---|---|
committer | Dirkjan Ochtman <dirkjan@ochtman.nl> | 2021-07-02 16:12:42 +0200 |
commit | c31fe5f3fc313ca539ff1f1c92cc1337a472e809 (patch) | |
tree | ea422d08f55aa149e86d953d82156065280bceba /testing/tests/ui.rs | |
parent | 8bb3de0a3e586da6b719abedcfcc58e901eddc12 (diff) | |
download | askama-c31fe5f3fc313ca539ff1f1c92cc1337a472e809.tar.gz askama-c31fe5f3fc313ca539ff1f1c92cc1337a472e809.tar.bz2 askama-c31fe5f3fc313ca539ff1f1c92cc1337a472e809.zip |
Fix expected error message for missing file
rust-lang/rust#82069 made error message that stem macro invocations more
verbose. Since Rust 1.54 (currently in beta) the message includes the
name of the offending macro.
This PR uses version_check to select the appropriate expected error
message.
Diffstat (limited to '')
-rw-r--r-- | testing/tests/ui.rs | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/testing/tests/ui.rs b/testing/tests/ui.rs index 17c2248..39a0b78 100644 --- a/testing/tests/ui.rs +++ b/testing/tests/ui.rs @@ -1,7 +1,14 @@ use trybuild::TestCases; +use version_check as rustc; #[cfg_attr(not(windows), test)] 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"); + } } |