-
-
Notifications
You must be signed in to change notification settings - Fork 223
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
3 changed files
with
23 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
// Nb. this test fails because currently an empty array "[]" is always a syntax error in askama, | ||
// but even if this changes, this test should keep failing, but possibly with another error message | ||
|
||
use askama::Template; | ||
|
||
#[derive(Template)] | ||
#[template( | ||
source = r#"{% for v in values %}{{ loop.cycle([]) }}{{ v }},{% endfor %}"#, | ||
ext = "txt" | ||
)] | ||
struct ForCycleEmpty; | ||
|
||
fn main() { | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
error: problems parsing template source at row 1, column 34 near: | ||
"([]) }}{{ v }},{% endfor %}" | ||
--> tests/ui/loop_cycle_empty.rs:6:10 | ||
| | ||
6 | #[derive(Template)] | ||
| ^^^^^^^^ | ||
| | ||
= note: this error originates in the derive macro `Template` (in Nightly builds, run with -Z macro-backtrace for more info) |