Skip to content

Commit 1df6511

Browse files
update tests
1 parent 61ab198 commit 1df6511

File tree

3 files changed

+32
-52
lines changed

3 files changed

+32
-52
lines changed

packages/yew-macro/tests/html_macro/component-fail.stderr

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -688,13 +688,13 @@ note: required by a bound in `ChildContainerPropertiesBuilder::children`
688688
| -------- required by a bound in this associated function
689689
= note: this error originates in the derive macro `Properties` (in Nightly builds, run with -Z macro-backtrace for more info)
690690

691-
error[E0277]: the trait bound `VChild<Child>: From<VNode>` is not satisfied
691+
error[E0277]: the trait bound `VChild<Child>: From<yew::virtual_dom::VList>` is not satisfied
692692
--> tests/html_macro/component-fail.rs:118:29
693693
|
694694
118 | html! { <ChildContainer><></></ChildContainer> };
695-
| ^ the trait `From<VNode>` is not implemented for `VChild<Child>`, which is required by `VNode: Into<_>`
695+
| ^ the trait `From<yew::virtual_dom::VList>` is not implemented for `VChild<Child>`, which is required by `yew::virtual_dom::VList: Into<_>`
696696
|
697-
= note: required for `VNode` to implement `Into<VChild<Child>>`
697+
= note: required for `yew::virtual_dom::VList` to implement `Into<VChild<Child>>`
698698

699699
error[E0277]: the trait bound `VNode: IntoPropValue<ChildrenRenderer<VChild<Child>>>` is not satisfied
700700
--> tests/html_macro/component-fail.rs:119:30

packages/yew-macro/tests/html_macro/for-fail.stderr

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ error[E0308]: mismatched types
5252
9 | _ = ::yew::html!{for (x, y) in 0 .. 10 {
5353
| ^^^^^^
5454
| |
55-
| expected integer, found tuple
55+
| expected integer, found `(_, _)`
5656
| expected due to this
5757
|
5858
= note: expected type `{integer}`

packages/yew-macro/tests/html_macro/iterable-fail.stderr

Lines changed: 28 additions & 48 deletions
Original file line numberDiff line numberDiff line change
@@ -1,67 +1,47 @@
1-
error: expected an expression after the keyword `for`
2-
--> tests/html_macro/iterable-fail.rs:4:13
1+
error: unexpected end of input, expected one of: identifier, `::`, `<`, `_`, literal, `const`, `ref`, `mut`, `&`, parentheses, square brackets, `..`, `const`
2+
--> tests/html_macro/iterable-fail.rs:4:5
33
|
44
4 | html! { for };
5-
| ^^^
6-
7-
error[E0277]: `()` is not an iterator
8-
--> tests/html_macro/iterable-fail.rs:5:17
9-
|
10-
5 | html! { for () };
11-
| ^^ `()` is not an iterator
5+
| ^^^^^^^^^^^^^
126
|
13-
= help: the trait `Iterator` is not implemented for `()`, which is required by `(): IntoIterator`
14-
= note: required for `()` to implement `IntoIterator`
7+
= note: this error originates in the macro `html` (in Nightly builds, run with -Z macro-backtrace for more info)
158

16-
error[E0277]: `()` is not an iterator
17-
--> tests/html_macro/iterable-fail.rs:6:17
9+
error: unexpected end of input, expected `in`
10+
--> tests/html_macro/iterable-fail.rs:5:5
1811
|
19-
6 | html! { for {()} };
20-
| ^--^
21-
| ||
22-
| |this tail expression is of type `()`
23-
| `()` is not an iterator
12+
5 | html! { for () };
13+
| ^^^^^^^^^^^^^^^^
2414
|
25-
= help: the trait `Iterator` is not implemented for `()`, which is required by `(): IntoIterator`
26-
= note: required for `()` to implement `IntoIterator`
15+
= note: this error originates in the macro `html` (in Nightly builds, run with -Z macro-backtrace for more info)
2716

28-
error[E0277]: `()` doesn't implement `std::fmt::Display`
29-
--> tests/html_macro/iterable-fail.rs:7:17
17+
error: expected `in`
18+
--> tests/html_macro/iterable-fail.rs:7:33
3019
|
3120
7 | html! { for Vec::<()>::new().into_iter() };
32-
| ^^^ `()` cannot be formatted with the default formatter
33-
|
34-
= help: the trait `std::fmt::Display` is not implemented for `()`, which is required by `VNode: FromIterator<_>`
35-
= note: in format strings you may be able to use `{:?}` (or {:#?} for pretty-print) instead
36-
= help: the trait `FromIterator<A>` is implemented for `VNode`
37-
= note: required for `()` to implement `ToString`
38-
= note: required for `VNode` to implement `From<()>`
39-
= note: required for `()` to implement `Into<VNode>`
40-
= note: required for `VNode` to implement `FromIterator<()>`
41-
note: required by a bound in `collect`
42-
--> $RUST/core/src/iter/traits/iterator.rs
21+
| ^
4322

44-
error[E0277]: `()` doesn't implement `std::fmt::Display`
45-
--> tests/html_macro/iterable-fail.rs:10:17
23+
error: unexpected end of input, expected `in`
24+
--> tests/html_macro/iterable-fail.rs:10:5
4625
|
4726
10 | html! { for empty };
48-
| ^^^^^ `()` cannot be formatted with the default formatter
27+
| ^^^^^^^^^^^^^^^^^^^
4928
|
50-
= help: the trait `std::fmt::Display` is not implemented for `()`, which is required by `VNode: FromIterator<_>`
51-
= note: in format strings you may be able to use `{:?}` (or {:#?} for pretty-print) instead
52-
= help: the trait `FromIterator<A>` is implemented for `VNode`
53-
= note: required for `()` to implement `ToString`
54-
= note: required for `VNode` to implement `From<()>`
55-
= note: required for `()` to implement `Into<VNode>`
56-
= note: required for `VNode` to implement `FromIterator<()>`
57-
note: required by a bound in `collect`
58-
--> $RUST/core/src/iter/traits/iterator.rs
29+
= note: this error originates in the macro `html` (in Nightly builds, run with -Z macro-backtrace for more info)
30+
31+
error[E0277]: `()` is not an iterator
32+
--> tests/html_macro/iterable-fail.rs:6:18
33+
|
34+
6 | html! { {for ()} };
35+
| ^^ `()` is not an iterator
36+
|
37+
= help: the trait `Iterator` is not implemented for `()`, which is required by `(): IntoIterator`
38+
= note: required for `()` to implement `IntoIterator`
5939

6040
error[E0277]: `()` doesn't implement `std::fmt::Display`
61-
--> tests/html_macro/iterable-fail.rs:13:17
41+
--> tests/html_macro/iterable-fail.rs:13:18
6242
|
63-
13 | html! { for empty.iter() };
64-
| ^^^^^ `()` cannot be formatted with the default formatter
43+
13 | html! { {for empty.iter()} };
44+
| ^^^^^ `()` cannot be formatted with the default formatter
6545
|
6646
= help: the trait `std::fmt::Display` is not implemented for `()`, which is required by `VNode: FromIterator<_>`
6747
= note: in format strings you may be able to use `{:?}` (or {:#?} for pretty-print) instead

0 commit comments

Comments
 (0)