diff --git a/testing/tests/ui/filter-recursion.rs b/testing/tests/ui/filter-recursion.rs new file mode 100644 index 000000000..12ae40eb3 --- /dev/null +++ b/testing/tests/ui/filter-recursion.rs @@ -0,0 +1,9 @@ +use askama::Template; + +#[derive(Template)] +#[template(source = "{{ s|a|a|a|a|a|a|a|A|a|a|a|a|a|a|a|a|a|a|a|a|a", ext = "txt")] +struct Filtered { + s: &'static str, +} + +fn main() {} diff --git a/testing/tests/ui/filter-recursion.stderr b/testing/tests/ui/filter-recursion.stderr new file mode 100644 index 000000000..2fff55bfd --- /dev/null +++ b/testing/tests/ui/filter-recursion.stderr @@ -0,0 +1,8 @@ +error: problems parsing template source at row 1, column 46 near: + "" + --> tests/ui/filter-recursion.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)