diff options
Diffstat (limited to 'testing/tests/ui')
-rw-r--r-- | testing/tests/ui/break_outside_of_loop.rs | 11 | ||||
-rw-r--r-- | testing/tests/ui/break_outside_of_loop.stderr | 8 |
2 files changed, 19 insertions, 0 deletions
diff --git a/testing/tests/ui/break_outside_of_loop.rs b/testing/tests/ui/break_outside_of_loop.rs new file mode 100644 index 0000000..ccbb0a9 --- /dev/null +++ b/testing/tests/ui/break_outside_of_loop.rs @@ -0,0 +1,11 @@ +use askama::Template; + +#[derive(Template)] +#[template( + source = "Have a {%break%}, have a parsing error!", + ext = "txt" +)] +struct MyTemplate; + +fn main() { +} diff --git a/testing/tests/ui/break_outside_of_loop.stderr b/testing/tests/ui/break_outside_of_loop.stderr new file mode 100644 index 0000000..99d1d25 --- /dev/null +++ b/testing/tests/ui/break_outside_of_loop.stderr @@ -0,0 +1,8 @@ +error: problems parsing template source at row 1, column 9 near: +"break%}, have a parsing error!" + --> $DIR/break_outside_of_loop.rs:3:10 + | +3 | #[derive(Template)] + | ^^^^^^^^ + | + = note: this error originates in the derive macro `Template` (in Nightly builds, run with -Z macro-backtrace for more info) |