askama/testing/tests/ui/let_destructuring_has_rest.rs
2024-06-28 05:25:21 +02:00

41 lines
638 B
Rust

use rinja::Template;
struct X {
a: u32,
b: u32,
}
#[derive(Template)]
#[template(source = "
{%- if let X { a, .. } = x -%}hello {{ a }}{%- endif -%}
", ext = "html")]
struct T1 {
x: X,
}
#[derive(Template)]
#[template(source = "
{%- if let X { a, .., } = x -%}hello {{ a }}{%- endif -%}
", ext = "html")]
struct T2 {
x: X,
}
#[derive(Template)]
#[template(source = "
{%- if let X { a .. } = x -%}hello {{ a }}{%- endif -%}
", ext = "html")]
struct T3 {
x: X,
}
#[derive(Template)]
#[template(source = "
{%- if let X { .. } = x -%}hello {{ a }}{%- endif -%}
", ext = "html")]
struct T4 {
x: X,
}
fn main() {}