askama/testing/tests/ui/rest_pattern.stderr

61 lines
1.6 KiB
Plaintext

error: `..` can only be used once per array pattern
--> <source attribute>:2:31
"..] = [1, 2, 3, 4] -%}\n{%- endif -%}\n"
--> tests/ui/rest_pattern.rs:6:14
|
6 | source = r#"
| ______________^
7 | | {%- if let [1, 2, who @ .., 4, ..] = [1, 2, 3, 4] -%}
8 | | {%- endif -%}
9 | | "#,
| |__^
error: `..` can only be used once per tuple pattern
--> <source attribute>:2:22
".., 4) = (1, 2, 3, 4) -%}\n{%- endif -%}\n"
--> tests/ui/rest_pattern.rs:16:14
|
16 | source = r#"
| ______________^
17 | | {%- if let (.., 1, 2, .., 4) = (1, 2, 3, 4) -%}
18 | | {%- endif -%}
19 | | "#,
| |__^
error: unexpected `,` character after `..`
note that in a named struct, `..` must come last to ignore other members
--> <source attribute>:2:20
", a, .. } = [1, 2, 3, 4] -%}\n{%- endif -%}\n"
--> tests/ui/rest_pattern.rs:28:14
|
28 | source = r#"
| ______________^
29 | | {%- if let Cake { .., a, .. } = [1, 2, 3, 4] -%}
30 | | {%- endif -%}
31 | | "#,
| |__^
error: `@ ..` is only allowed in slice patterns
--> <source attribute>:2:18
"who @ .., 4) = (1, 2, 3, 4) -%}\n{%- endif -%}\n"
--> tests/ui/rest_pattern.rs:39:14
|
39 | source = r#"
| ______________^
40 | | {%- if let (1, 2, who @ .., 4) = (1, 2, 3, 4) -%}
41 | | {%- endif -%}
42 | | "#,
| |__^
error: `@ ..` cannot be used in struct
--> <source attribute>:2:21
"who @ .. } = [1, 2, 3, 4] -%}\n{%- endif -%}\n"
--> tests/ui/rest_pattern.rs:51:14
|
51 | source = r#"
| ______________^
52 | | {%- if let Cake { a, who @ .. } = [1, 2, 3, 4] -%}
53 | | {%- endif -%}
54 | | "#,
| |__^