mirror of
https://github.com/askama-rs/askama.git
synced 2025-09-29 22:11:17 +00:00

The string concatenation operator `~` is present in jinja and tera: <https://jinja.palletsprojects.com/en/stable/templates/#other-operators>. While it's not the most important operator, it can come in handy e.g. with filters: `{{ a|upper }}{{ b|upper }}` → `{{ (a ~ b)|upper }}`.
80 lines
2.2 KiB
Plaintext
80 lines
2.2 KiB
Plaintext
error: the concat operator `~` must be surrounded by spaces
|
|
--> <source attribute>:1:4
|
|
"~b }}"
|
|
--> tests/ui/concat.rs:4:21
|
|
|
|
|
4 | #[template(source = r#"{{ a~b }}"#, ext = "txt")]
|
|
| ^^^^^^^^^^^^^^
|
|
|
|
error: the concat operator `~` must be surrounded by spaces
|
|
--> <source attribute>:1:4
|
|
" ~b }}"
|
|
--> tests/ui/concat.rs:11:21
|
|
|
|
|
11 | #[template(source = r#"{{ a ~b }}"#, ext = "txt")]
|
|
| ^^^^^^^^^^^^^^^
|
|
|
|
error: the concat operator `~` must be surrounded by spaces
|
|
--> <source attribute>:1:4
|
|
"~ b }}"
|
|
--> tests/ui/concat.rs:18:21
|
|
|
|
|
18 | #[template(source = r#"{{ a~ b }}"#, ext = "txt")]
|
|
| ^^^^^^^^^^^^^^^
|
|
|
|
error: the concat operator `~` must be surrounded by spaces
|
|
--> <source attribute>:1:4
|
|
"~b~}}"
|
|
--> tests/ui/concat.rs:25:21
|
|
|
|
|
25 | #[template(source = r#"{{~a~b~}}"#, ext = "txt")]
|
|
| ^^^^^^^^^^^^^^
|
|
|
|
error: the concat operator `~` must be surrounded by spaces
|
|
--> <source attribute>:1:4
|
|
" ~b~}}"
|
|
--> tests/ui/concat.rs:32:21
|
|
|
|
|
32 | #[template(source = r#"{{~a ~b~}}"#, ext = "txt")]
|
|
| ^^^^^^^^^^^^^^^
|
|
|
|
error: the concat operator `~` must be surrounded by spaces
|
|
--> <source attribute>:1:4
|
|
"~ b~}}"
|
|
--> tests/ui/concat.rs:39:21
|
|
|
|
|
39 | #[template(source = r#"{{~a~ b~}}"#, ext = "txt")]
|
|
| ^^^^^^^^^^^^^^^
|
|
|
|
error: failed to parse template source
|
|
--> <source attribute>:1:7
|
|
"}}"
|
|
--> tests/ui/concat.rs:46:21
|
|
|
|
|
46 | #[template(source = r#"{{ a ~ }}"#, ext = "txt")]
|
|
| ^^^^^^^^^^^^^^
|
|
|
|
error: failed to parse template source
|
|
--> <source attribute>:1:3
|
|
"~ b }}"
|
|
--> tests/ui/concat.rs:52:21
|
|
|
|
|
52 | #[template(source = r#"{{ ~ b }}"#, ext = "txt")]
|
|
| ^^^^^^^^^^^^^^
|
|
|
|
error: failed to parse template source
|
|
--> <source attribute>:1:6
|
|
"~}}"
|
|
--> tests/ui/concat.rs:58:21
|
|
|
|
|
58 | #[template(source = r#"{{~a ~~}}"#, ext = "txt")]
|
|
| ^^^^^^^^^^^^^^
|
|
|
|
error: failed to parse template source
|
|
--> <source attribute>:1:3
|
|
"~ b~}}"
|
|
--> tests/ui/concat.rs:64:21
|
|
|
|
|
64 | #[template(source = r#"{{~~ b~}}"#, ext = "txt")]
|
|
| ^^^^^^^^^^^^^^
|