-
Notifications
You must be signed in to change notification settings - Fork 12
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
37 changed files
with
306 additions
and
209 deletions.
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 |
---|---|---|
@@ -1,47 +1,47 @@ | ||
error: `as` operator expects the name of a primitive type on its right-hand side | ||
--> <source attribute>:1:8 | ||
"as 4567 }}" | ||
--> tests/ui/as-primitive-type.rs:4:12 | ||
--> tests/ui/as-primitive-type.rs:4:21 | ||
| | ||
4 | #[template(source = r#"{{ 1234 as 4567 }}"#, ext = "html")] | ||
| ^^^^^^ | ||
| ^^^^^^^^^^^^^^^^^^^^^^^ | ||
|
||
error: `as` operator expects the name of a primitive type on its right-hand side | ||
--> <source attribute>:1:8 | ||
"as ? }}" | ||
--> tests/ui/as-primitive-type.rs:8:12 | ||
--> tests/ui/as-primitive-type.rs:8:21 | ||
| | ||
8 | #[template(source = r#"{{ 1234 as ? }}"#, ext = "html")] | ||
| ^^^^^^ | ||
| ^^^^^^^^^^^^^^^^^^^^ | ||
|
||
error: `as` operator expects the name of a primitive type on its right-hand side, found `u1234` | ||
--> <source attribute>:1:8 | ||
"as u1234 }}" | ||
--> tests/ui/as-primitive-type.rs:12:12 | ||
--> tests/ui/as-primitive-type.rs:12:21 | ||
| | ||
12 | #[template(source = r#"{{ 1234 as u1234 }}"#, ext = "html")] | ||
| ^^^^^^ | ||
| ^^^^^^^^^^^^^^^^^^^^^^^^ | ||
|
||
error: `as` operator expects the name of a primitive type on its right-hand side, found `core` | ||
--> <source attribute>:1:8 | ||
"as core::primitive::u32 }}" | ||
--> tests/ui/as-primitive-type.rs:16:12 | ||
--> tests/ui/as-primitive-type.rs:16:21 | ||
| | ||
16 | #[template(source = r#"{{ 1234 as core::primitive::u32 }}"#, ext = "html")] | ||
| ^^^^^^ | ||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | ||
|
||
error: `as` operator expects the name of a primitive type on its right-hand side, found `int32_t` | ||
--> <source attribute>:1:8 | ||
"as int32_t }}" | ||
--> tests/ui/as-primitive-type.rs:20:12 | ||
--> tests/ui/as-primitive-type.rs:20:21 | ||
| | ||
20 | #[template(source = r#"{{ 1234 as int32_t }}"#, ext = "html")] | ||
| ^^^^^^ | ||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^ | ||
|
||
error: `as` operator expects the name of a primitive type on its right-hand side, found `int32_t` | ||
--> <source attribute>:1:35 | ||
"as int32_t }}" | ||
--> tests/ui/as-primitive-type.rs:24:12 | ||
--> tests/ui/as-primitive-type.rs:24:21 | ||
| | ||
24 | #[template(source = r#"{{ (1234 + 4 * 12 / 45675445 - 13) as int32_t }}"#, ext = "html")] | ||
| ^^^^^^ | ||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ |
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 |
---|---|---|
@@ -1,7 +1,14 @@ | ||
error: cannot have a block inside a filter block | ||
--> BlockInFilter.html:7:10 | ||
" block title %}New title{% endblock %}\n a b\n {% endfilter %}\n{%- endblock body %}\n" | ||
--> tests/ui/block_in_filter_block.rs:5:5 | ||
| | ||
5 | source = r#"{% extends "html-base.html" %} | ||
| ^^^^^^ | ||
--> tests/ui/block_in_filter_block.rs:5:14 | ||
| | ||
5 | source = r#"{% extends "html-base.html" %} | ||
| ______________^ | ||
6 | | | ||
7 | | {%- block body -%} | ||
8 | | <h1>Metadata</h1> | ||
... | | ||
14 | | {%- endblock body %} | ||
15 | | "#, | ||
| |__^ |
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 |
---|---|---|
@@ -1,23 +1,39 @@ | ||
error: `extends` blocks are not allowed below top level | ||
--> MyTemplate1.txt:3:2 | ||
" extends \"bla.txt\" %}\n{% endblock %}\n" | ||
--> tests/ui/blocks_below_top_level.rs:4:12 | ||
--> tests/ui/blocks_below_top_level.rs:4:21 | ||
| | ||
4 | #[template(source = r#" | ||
| ^^^^^^ | ||
4 | #[template(source = r#" | ||
| _____________________^ | ||
5 | | {% block bla %} | ||
6 | | {% extends "bla.txt" %} | ||
7 | | {% endblock %} | ||
8 | | "#, ext = "txt")] | ||
| |__^ | ||
|
||
error: `macro` blocks are not allowed below top level | ||
--> MyTemplate2.txt:3:2 | ||
" macro bla() %}\n{% endmacro %}\n{% endblock %}\n" | ||
--> tests/ui/blocks_below_top_level.rs:12:12 | ||
--> tests/ui/blocks_below_top_level.rs:12:21 | ||
| | ||
12 | #[template(source = r#" | ||
| ^^^^^^ | ||
12 | #[template(source = r#" | ||
| _____________________^ | ||
13 | | {% block bla %} | ||
14 | | {% macro bla() %} | ||
15 | | {% endmacro %} | ||
16 | | {% endblock %} | ||
17 | | "#, ext = "txt")] | ||
| |__^ | ||
|
||
error: `import` blocks are not allowed below top level | ||
--> MyTemplate3.txt:3:2 | ||
" import \"bla.txt\" as blue %}\n{% endblock %}\n" | ||
--> tests/ui/blocks_below_top_level.rs:21:12 | ||
--> tests/ui/blocks_below_top_level.rs:21:21 | ||
| | ||
21 | #[template(source = r#" | ||
| ^^^^^^ | ||
21 | #[template(source = r#" | ||
| _____________________^ | ||
22 | | {% block bla %} | ||
23 | | {% import "bla.txt" as blue %} | ||
24 | | {% endblock %} | ||
25 | | "#, ext = "txt")] | ||
| |__^ |
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 |
---|---|---|
@@ -1,7 +1,7 @@ | ||
error: you can only `break` inside a `for` loop | ||
--> <source attribute>:1:9 | ||
"break%}, have a parsing error!" | ||
--> tests/ui/break_outside_of_loop.rs:5:5 | ||
--> tests/ui/break_outside_of_loop.rs:5:14 | ||
| | ||
5 | source = "Have a {%break%}, have a parsing error!", | ||
| ^^^^^^ | ||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ |
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 |
---|---|---|
@@ -1,25 +1,25 @@ | ||
error: `$WORKSPACE/target/tests/trybuild/rinja_testing/no-such-config.toml` does not exist | ||
--> tests/ui/broken-config.rs:4:38 | ||
--> tests/ui/broken-config.rs:4:47 | ||
| | ||
4 | #[template(source = "", ext = "txt", config = "no-such-config.toml")] | ||
| ^^^^^^ | ||
| ^^^^^^^^^^^^^^^^^^^^^ | ||
|
||
error: unable to read $WORKSPACE/target/tests/trybuild/rinja_testing/folder-config.toml: Is a directory (os error 21) | ||
--> tests/ui/broken-config.rs:8:38 | ||
--> tests/ui/broken-config.rs:8:47 | ||
| | ||
8 | #[template(source = "", ext = "txt", config = "folder-config.toml")] | ||
| ^^^^^^ | ||
| ^^^^^^^^^^^^^^^^^^^^ | ||
|
||
error: a delimiter may not be the prefix of another delimiter: "<<<" vs "<<<<" | ||
--> testing/delim-clash.toml | ||
--> tests/ui/broken-config.rs:12:38 | ||
--> tests/ui/broken-config.rs:12:47 | ||
| | ||
12 | #[template(source = "", ext = "txt", config = "delim-clash.toml")] | ||
| ^^^^^^ | ||
| ^^^^^^^^^^^^^^^^^^ | ||
|
||
error: delimiters must be at least two characters long: "<" | ||
--> testing/delim-too-short.toml | ||
--> tests/ui/broken-config.rs:16:38 | ||
--> tests/ui/broken-config.rs:16:47 | ||
| | ||
16 | #[template(source = "", ext = "txt", config = "delim-too-short.toml")] | ||
| ^^^^^^ | ||
| ^^^^^^^^^^^^^^^^^^^^^^ |
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 |
---|---|---|
@@ -1,63 +1,63 @@ | ||
error: invalid character | ||
--> testing/templates/char-literals/char-literal-1.txt:1:11 | ||
"'\\a' %}" | ||
--> tests/ui/char_literal.rs:4:12 | ||
--> tests/ui/char_literal.rs:4:19 | ||
| | ||
4 | #[template(path = "char-literals/char-literal-1.txt")] | ||
| ^^^^ | ||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | ||
|
||
error: invalid character | ||
--> testing/templates/char-literals/char-literal-2.txt:1:11 | ||
"'\\x' %}" | ||
--> tests/ui/char_literal.rs:8:12 | ||
--> tests/ui/char_literal.rs:8:19 | ||
| | ||
8 | #[template(path = "char-literals/char-literal-2.txt")] | ||
| ^^^^ | ||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | ||
|
||
error: invalid character | ||
--> testing/templates/char-literals/char-literal-3.txt:1:11 | ||
"'\\x1' %}" | ||
--> tests/ui/char_literal.rs:12:12 | ||
--> tests/ui/char_literal.rs:12:19 | ||
| | ||
12 | #[template(path = "char-literals/char-literal-3.txt")] | ||
| ^^^^ | ||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | ||
|
||
error: must be a character in the range [\x00-\x7f] | ||
--> testing/templates/char-literals/char-literal-4.txt:1:11 | ||
"'\\x80' %}" | ||
--> tests/ui/char_literal.rs:16:12 | ||
--> tests/ui/char_literal.rs:16:19 | ||
| | ||
16 | #[template(path = "char-literals/char-literal-4.txt")] | ||
| ^^^^ | ||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | ||
|
||
error: invalid character | ||
--> testing/templates/char-literals/char-literal-5.txt:1:11 | ||
"'\\u' %}" | ||
--> tests/ui/char_literal.rs:20:12 | ||
--> tests/ui/char_literal.rs:20:19 | ||
| | ||
20 | #[template(path = "char-literals/char-literal-5.txt")] | ||
| ^^^^ | ||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | ||
|
||
error: invalid character | ||
--> testing/templates/char-literals/char-literal-6.txt:1:11 | ||
"'\\u{}' %}" | ||
--> tests/ui/char_literal.rs:24:12 | ||
--> tests/ui/char_literal.rs:24:19 | ||
| | ||
24 | #[template(path = "char-literals/char-literal-6.txt")] | ||
| ^^^^ | ||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | ||
|
||
error: unicode escape must be at most 10FFFF | ||
--> testing/templates/char-literals/char-literal-7.txt:1:11 | ||
"'\\u{110000}' %}" | ||
--> tests/ui/char_literal.rs:28:12 | ||
--> tests/ui/char_literal.rs:28:19 | ||
| | ||
28 | #[template(path = "char-literals/char-literal-7.txt")] | ||
| ^^^^ | ||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | ||
|
||
error: invalid character | ||
--> <source attribute>:1:11 | ||
"'aaa' %}" | ||
--> tests/ui/char_literal.rs:32:12 | ||
--> tests/ui/char_literal.rs:32:21 | ||
| | ||
32 | #[template(source = "{% let s = 'aaa' %}", ext = "html")] | ||
| ^^^^^^ | ||
| ^^^^^^^^^^^^^^^^^^^^^ |
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 |
---|---|---|
@@ -1,7 +1,7 @@ | ||
error: cyclic dependency in graph [ | ||
"\"$WORKSPACE/target/tests/trybuild/rinja_testing/templates/cycle1.html/" --> \"$WORKSPACE/target/tests/trybuild/rinja_testing/templates/cycle1.html/"", | ||
] | ||
--> tests/ui/cycle2.rs:4:12 | ||
--> tests/ui/cycle2.rs:4:19 | ||
| | ||
4 | #[template(path = "cycle1.html")] | ||
| ^^^^ | ||
| ^^^^^^^^^^^^^ |
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 |
---|---|---|
@@ -1,23 +1,23 @@ | ||
error: failed to parse template source | ||
--> testing/templates/invalid_syntax.html:1:14 | ||
"}" | ||
--> tests/ui/error_file_path.rs:4:12 | ||
--> tests/ui/error_file_path.rs:4:19 | ||
| | ||
4 | #[template(path = "invalid_syntax.html")] | ||
| ^^^^ | ||
| ^^^^^^^^^^^^^^^^^^^^^ | ||
|
||
error: failed to parse template source | ||
--> testing/templates/invalid_syntax.html:1:14 | ||
"}" | ||
--> tests/ui/error_file_path.rs:8:12 | ||
--> tests/ui/error_file_path.rs:8:19 | ||
| | ||
8 | #[template(path = "include_invalid_syntax.html")] | ||
| ^^^^ | ||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | ||
|
||
error: failed to parse template source | ||
--> testing/templates/invalid_syntax.html:1:14 | ||
"}" | ||
--> tests/ui/error_file_path.rs:12:12 | ||
--> tests/ui/error_file_path.rs:12:21 | ||
| | ||
12 | #[template(source = r#"{% extends "include_invalid_syntax.html" %}"#, ext = "txt")] | ||
| ^^^^^^ | ||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ |
Oops, something went wrong.