aboutsummaryrefslogtreecommitdiffstats
path: root/testing/tests/ui/before_1_54
diff options
context:
space:
mode:
authorLibravatar René Kijewski <kijewski@library.vetmed.fu-berlin.de>2021-07-02 15:54:17 +0200
committerLibravatar Dirkjan Ochtman <dirkjan@ochtman.nl>2021-07-02 16:12:42 +0200
commitc31fe5f3fc313ca539ff1f1c92cc1337a472e809 (patch)
treeea422d08f55aa149e86d953d82156065280bceba /testing/tests/ui/before_1_54
parent8bb3de0a3e586da6b719abedcfcc58e901eddc12 (diff)
downloadaskama-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 'testing/tests/ui/before_1_54')
-rw-r--r--testing/tests/ui/before_1_54/incorrect_path.rs8
-rw-r--r--testing/tests/ui/before_1_54/incorrect_path.stderr7
2 files changed, 15 insertions, 0 deletions
diff --git a/testing/tests/ui/before_1_54/incorrect_path.rs b/testing/tests/ui/before_1_54/incorrect_path.rs
new file mode 100644
index 0000000..f0c85cf
--- /dev/null
+++ b/testing/tests/ui/before_1_54/incorrect_path.rs
@@ -0,0 +1,8 @@
+use askama::Template;
+
+#[derive(Template)]
+#[template(path = "thisdoesnotexist.html")]
+struct MyTemplate;
+
+fn main() {
+}
diff --git a/testing/tests/ui/before_1_54/incorrect_path.stderr b/testing/tests/ui/before_1_54/incorrect_path.stderr
new file mode 100644
index 0000000..ea97149
--- /dev/null
+++ b/testing/tests/ui/before_1_54/incorrect_path.stderr
@@ -0,0 +1,7 @@
+error: template "thisdoesnotexist.html" not found in directories ["$WORKSPACE/target/tests/askama_testing/templates"]
+ --> $DIR/incorrect_path.rs:3:10
+ |
+3 | #[derive(Template)]
+ | ^^^^^^^^
+ |
+ = note: this error originates in a derive macro (in Nightly builds, run with -Z macro-backtrace for more info)