mirror of
https://github.com/yewstack/yew.git
synced 2025-12-08 21:26:25 +00:00
This drops the "optional" conversion concept in favor of directly converting to `Option<T>`. fixes #1888
80 lines
3.6 KiB
Plaintext
80 lines
3.6 KiB
Plaintext
error: expected an expression after the keyword `for`
|
|
--> $DIR/iterable-fail.rs:4:13
|
|
|
|
|
4 | html! { for };
|
|
| ^^^
|
|
|
|
error[E0277]: `()` is not an iterator
|
|
--> $DIR/iterable-fail.rs:5:17
|
|
|
|
|
5 | html! { for () };
|
|
| ^^ `()` is not an iterator
|
|
|
|
|
= help: the trait `Iterator` is not implemented for `()`
|
|
= note: required because of the requirements on the impl of `IntoIterator` for `()`
|
|
= note: required by `into_iter`
|
|
|
|
error[E0277]: `()` is not an iterator
|
|
--> $DIR/iterable-fail.rs:6:17
|
|
|
|
|
6 | html! { for {()} };
|
|
| ^^^^ `()` is not an iterator
|
|
|
|
|
= help: the trait `Iterator` is not implemented for `()`
|
|
= note: required because of the requirements on the impl of `IntoIterator` for `()`
|
|
= note: required by `into_iter`
|
|
|
|
error[E0277]: `()` doesn't implement `std::fmt::Display`
|
|
--> $DIR/iterable-fail.rs:7:17
|
|
|
|
|
7 | html! { for Vec::<()>::new().into_iter() };
|
|
| ^^^ `()` cannot be formatted with the default formatter
|
|
|
|
|
= help: the trait `std::fmt::Display` is not implemented for `()`
|
|
= note: in format strings you may be able to use `{:?}` (or {:#?} for pretty-print) instead
|
|
= note: required because of the requirements on the impl of `ToString` for `()`
|
|
= note: required because of the requirements on the impl of `From<()>` for `VNode`
|
|
= note: required because of the requirements on the impl of `Into<VNode>` for `()`
|
|
= note: required because of the requirements on the impl of `FromIterator<()>` for `VNode`
|
|
|
|
error[E0277]: `()` doesn't implement `std::fmt::Display`
|
|
--> $DIR/iterable-fail.rs:10:17
|
|
|
|
|
10 | html! { for empty };
|
|
| ^^^^^ `()` cannot be formatted with the default formatter
|
|
|
|
|
= help: the trait `std::fmt::Display` is not implemented for `()`
|
|
= note: in format strings you may be able to use `{:?}` (or {:#?} for pretty-print) instead
|
|
= note: required because of the requirements on the impl of `ToString` for `()`
|
|
= note: required because of the requirements on the impl of `From<()>` for `VNode`
|
|
= note: required because of the requirements on the impl of `Into<VNode>` for `()`
|
|
= note: required because of the requirements on the impl of `FromIterator<()>` for `VNode`
|
|
|
|
error[E0277]: `()` doesn't implement `std::fmt::Display`
|
|
--> $DIR/iterable-fail.rs:13:17
|
|
|
|
|
13 | html! { for empty.iter() };
|
|
| ^^^^^ `()` cannot be formatted with the default formatter
|
|
|
|
|
= help: the trait `std::fmt::Display` is not implemented for `()`
|
|
= note: in format strings you may be able to use `{:?}` (or {:#?} for pretty-print) instead
|
|
= note: required because of the requirements on the impl of `std::fmt::Display` for `&()`
|
|
= note: required because of the requirements on the impl of `ToString` for `&()`
|
|
= note: required because of the requirements on the impl of `From<&()>` for `VNode`
|
|
= note: required because of the requirements on the impl of `Into<VNode>` for `&()`
|
|
= note: required because of the requirements on the impl of `FromIterator<&()>` for `VNode`
|
|
|
|
error[E0277]: `()` is not an iterator
|
|
--> $DIR/iterable-fail.rs:18:19
|
|
|
|
|
18 | { for () }
|
|
| ^^ `()` is not an iterator
|
|
|
|
|
::: $WORKSPACE/packages/yew/src/utils.rs:50:9
|
|
|
|
|
50 | IT: IntoIterator<Item = T>,
|
|
| ---------------------- required by this bound in `into_node_iter`
|
|
|
|
|
= help: the trait `Iterator` is not implemented for `()`
|
|
= note: required because of the requirements on the impl of `IntoIterator` for `()`
|