mirror of
https://github.com/askama-rs/askama.git
synced 2025-10-01 06:51:15 +00:00
24 lines
441 B
Rust
24 lines
441 B
Rust
// Check that `mut` can only be used with a variable name (not destructuring).
|
|
|
|
use askama::Template;
|
|
|
|
#[derive(Template)]
|
|
#[template(source = r#"
|
|
{% let mut (a, b) = (1, 2) %}
|
|
"#, ext = "html")]
|
|
struct Var1;
|
|
|
|
#[derive(Template)]
|
|
#[template(source = r#"
|
|
{% let mut [a, b] = [1, 2] %}
|
|
"#, ext = "html")]
|
|
struct Var2;
|
|
|
|
#[derive(Template)]
|
|
#[template(source = r#"
|
|
{% let mut Some(a) = Some("a") %}
|
|
"#, ext = "html")]
|
|
struct Var3;
|
|
|
|
fn main() {}
|