This commit is contained in:
René Kijewski 2024-06-28 23:06:21 +02:00
parent cf4f514d7e
commit 0d8373e3b2

View File

@ -146,15 +146,19 @@ fn test_has_rest_pattern() {
assert_eq!(t.render().unwrap(), "hello 0hello 1hello 0");
}
#[allow(dead_code)]
struct X {
a: u32,
b: u32,
}
#[derive(Template)]
#[template(source = "
#[template(
source = "
{%- if let X { a, .. } = x -%}hello {{ a }}{%- endif -%}
", ext = "html")]
",
ext = "html"
)]
struct T1 {
x: X,
}
@ -168,9 +172,12 @@ fn test_t1() {
}
#[derive(Template)]
#[template(source = "
#[template(
source = "
{%- if let X { .. } = x -%}hello{%- endif -%}
", ext = "html")]
",
ext = "html"
)]
struct T2 {
x: X,
}