yew/tests/macro/html-component-fail.stderr
Justin Starry 70862a46a1
Revert "Improve nested html! expansion by unwrapping VNodes (#820)" (#842)
This reverts commit a900fbee496d1140b424bcb2f1c91402d20eca2b.
2020-01-04 13:35:50 -05:00

251 lines
10 KiB
Plaintext

error: this open tag has no corresponding close tag
--> $DIR/html-component-fail.rs:66:13
|
66 | html! { <Child> };
| ^^^^^^^
error: expected identifier
--> $DIR/html-component-fail.rs:67:22
|
67 | html! { <Child:: /> };
| ^
error: unexpected end of input, expected identifier
--> $DIR/html-component-fail.rs:68:5
|
68 | html! { <Child with /> };
| ^^^^^^^^^^^^^^^^^^^^^^^^^
|
= note: this error originates in a macro outside of the current crate (in Nightly builds, run with -Z external-macro-backtrace for more info)
error: unexpected token
--> $DIR/html-component-fail.rs:69:20
|
69 | html! { <Child props /> };
| ^^^^^
error: this open tag has no corresponding close tag
--> $DIR/html-component-fail.rs:70:13
|
70 | html! { <Child with props > };
| ^^^^^^^^^^^^^^^^^^^
error: unexpected token
--> $DIR/html-component-fail.rs:71:38
|
71 | html! { <Child with props ref=() ref=() /> };
| ^^^
error: unexpected token
--> $DIR/html-component-fail.rs:72:27
|
72 | html! { <Child ref=() with props /> };
| ^^^^
error: unexpected token
--> $DIR/html-component-fail.rs:74:31
|
74 | html! { <Child with props () /> };
| ^^
error: expected identifier
--> $DIR/html-component-fail.rs:75:20
|
75 | html! { <Child type=0 /> };
| ^^^^
error: expected identifier
--> $DIR/html-component-fail.rs:76:20
|
76 | html! { <Child invalid-prop-name=0 /> };
| ^^^^^^^^^^^^^^^^^
error: unexpected end of input, expected expression
--> $DIR/html-component-fail.rs:78:5
|
78 | html! { <Child string= /> };
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= note: this error originates in a macro outside of the current crate (in Nightly builds, run with -Z external-macro-backtrace for more info)
error: too many refs set
--> $DIR/html-component-fail.rs:83:33
|
83 | html! { <Child int=1 ref=() ref=() /> };
| ^^^
error: this close tag has no corresponding open tag
--> $DIR/html-component-fail.rs:86:13
|
86 | html! { </Child> };
| ^^^^^^^^
error: this open tag has no corresponding close tag
--> $DIR/html-component-fail.rs:87:13
|
87 | html! { <Child><Child></Child> };
| ^^^^^^^
error: only one root html element allowed
--> $DIR/html-component-fail.rs:88:28
|
88 | html! { <Child></Child><Child></Child> };
| ^^^^^^^^^^^^^^^
error: this close tag has no corresponding open tag
--> $DIR/html-component-fail.rs:97:30
|
97 | html! { <Generic<String>></Generic> };
| ^^^^^^^^^^
error: this close tag has no corresponding open tag
--> $DIR/html-component-fail.rs:98:30
|
98 | html! { <Generic<String>></Generic<Vec<String>>> };
| ^^^^^^^^^^^^^^^^^^^^^^^
error[E0425]: cannot find value `blah` in this scope
--> $DIR/html-component-fail.rs:73:25
|
73 | html! { <Child with blah /> };
| ^^^^ not found in this scope
error[E0609]: no field `unknown` on type `ChildProperties`
--> $DIR/html-component-fail.rs:77:20
|
77 | html! { <Child unknown="unknown" /> };
| ^^^^^^^ unknown field
|
= note: available fields are: `string`, `int`
error[E0599]: no method named `unknown` found for type `ChildPropertiesBuilder<ChildPropertiesBuilderStep_missing_required_prop_int>` in the current scope
--> $DIR/html-component-fail.rs:77:20
|
7 | #[derive(Clone, Properties, PartialEq)]
| - method `unknown` not found for this
...
77 | html! { <Child unknown="unknown" /> };
| ^^^^^^^ method not found in `ChildPropertiesBuilder<ChildPropertiesBuilderStep_missing_required_prop_int>`
error[E0308]: mismatched types
--> $DIR/html-component-fail.rs:79:33
|
79 | html! { <Child int=1 string={} /> };
| ^^ expected struct `std::string::String`, found ()
|
= note: expected type `std::string::String`
found type `()`
error[E0308]: mismatched types
--> $DIR/html-component-fail.rs:80:33
|
80 | html! { <Child int=1 string=3 /> };
| ^
| |
| expected struct `std::string::String`, found integer
| help: try using a conversion method: `3.to_string()`
|
= note: expected type `std::string::String`
found type `{integer}`
error[E0308]: mismatched types
--> $DIR/html-component-fail.rs:81:33
|
81 | html! { <Child int=1 string={3} /> };
| ^^^
| |
| expected struct `std::string::String`, found integer
| help: try using a conversion method: `{3}.to_string()`
|
= note: expected type `std::string::String`
found type `{integer}`
error[E0308]: mismatched types
--> $DIR/html-component-fail.rs:82:30
|
82 | html! { <Child int=1 ref=() /> };
| ^^ expected struct `yew::html::NodeRef`, found ()
|
= note: expected type `yew::html::NodeRef`
found type `()`
error[E0308]: mismatched types
--> $DIR/html-component-fail.rs:84:24
|
84 | html! { <Child int=0u32 /> };
| ^^^^ expected i32, found u32
|
help: you can convert an `u32` to `i32` and panic if the converted value wouldn't fit
|
84 | html! { <Child int=0u32.try_into().unwrap() /> };
| ^^^^^^^^^^^^^^^^^^^^^^^^
error[E0599]: no method named `string` found for type `ChildPropertiesBuilder<ChildPropertiesBuilderStep_missing_required_prop_int>` in the current scope
--> $DIR/html-component-fail.rs:85:20
|
7 | #[derive(Clone, Properties, PartialEq)]
| - method `string` not found for this
...
85 | html! { <Child string="abc" /> };
| ^^^^^^ method not found in `ChildPropertiesBuilder<ChildPropertiesBuilderStep_missing_required_prop_int>`
error[E0599]: no method named `children` found for type `ChildPropertiesBuilder<ChildPropertiesBuilderStep_missing_required_prop_int>` in the current scope
--> $DIR/html-component-fail.rs:89:5
|
7 | #[derive(Clone, Properties, PartialEq)]
| - method `children` not found for this
...
89 | html! { <Child>{ "Not allowed" }</Child> };
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ method not found in `ChildPropertiesBuilder<ChildPropertiesBuilderStep_missing_required_prop_int>`
|
= note: this error originates in a macro outside of the current crate (in Nightly builds, run with -Z external-macro-backtrace for more info)
error[E0599]: no method named `build` found for type `ChildContainerPropertiesBuilder<ChildContainerPropertiesBuilderStep_missing_required_prop_children>` in the current scope
--> $DIR/html-component-fail.rs:91:5
|
36 | #[derive(Clone, Properties)]
| - method `build` not found for this
...
91 | html! { <ChildContainer /> };
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ method not found in `ChildContainerPropertiesBuilder<ChildContainerPropertiesBuilderStep_missing_required_prop_children>`
|
= note: this error originates in a macro outside of the current crate (in Nightly builds, run with -Z external-macro-backtrace for more info)
error[E0599]: no method named `build` found for type `ChildContainerPropertiesBuilder<ChildContainerPropertiesBuilderStep_missing_required_prop_children>` in the current scope
--> $DIR/html-component-fail.rs:92:5
|
36 | #[derive(Clone, Properties)]
| - method `build` not found for this
...
92 | html! { <ChildContainer></ChildContainer> };
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ method not found in `ChildContainerPropertiesBuilder<ChildContainerPropertiesBuilderStep_missing_required_prop_children>`
|
= note: this error originates in a macro outside of the current crate (in Nightly builds, run with -Z external-macro-backtrace for more info)
error[E0277]: the trait bound `yew::virtual_dom::vcomp::VChild<Child>: std::convert::From<yew::virtual_dom::vnode::VNode>` is not satisfied
--> $DIR/html-component-fail.rs:93:5
|
93 | html! { <ChildContainer>{ "Not allowed" }</ChildContainer> };
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ the trait `std::convert::From<yew::virtual_dom::vnode::VNode>` is not implemented for `yew::virtual_dom::vcomp::VChild<Child>`
|
= note: required because of the requirements on the impl of `std::convert::Into<yew::virtual_dom::vcomp::VChild<Child>>` for `yew::virtual_dom::vnode::VNode`
= note: this error originates in a macro outside of the current crate (in Nightly builds, run with -Z external-macro-backtrace for more info)
error[E0277]: the trait bound `yew::virtual_dom::vcomp::VChild<Child>: std::convert::From<yew::virtual_dom::vnode::VNode>` is not satisfied
--> $DIR/html-component-fail.rs:94:5
|
94 | html! { <ChildContainer><></></ChildContainer> };
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ the trait `std::convert::From<yew::virtual_dom::vnode::VNode>` is not implemented for `yew::virtual_dom::vcomp::VChild<Child>`
|
= note: required because of the requirements on the impl of `std::convert::Into<yew::virtual_dom::vcomp::VChild<Child>>` for `yew::virtual_dom::vnode::VNode`
= note: this error originates in a macro outside of the current crate (in Nightly builds, run with -Z external-macro-backtrace for more info)
error[E0277]: the trait bound `yew::virtual_dom::vcomp::VChild<Child>: std::convert::From<yew::virtual_dom::vnode::VNode>` is not satisfied
--> $DIR/html-component-fail.rs:95:5
|
95 | html! { <ChildContainer><Child int=1 /><other /></ChildContainer> };
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ the trait `std::convert::From<yew::virtual_dom::vnode::VNode>` is not implemented for `yew::virtual_dom::vcomp::VChild<Child>`
|
= note: required because of the requirements on the impl of `std::convert::Into<yew::virtual_dom::vcomp::VChild<Child>>` for `yew::virtual_dom::vnode::VNode`
= note: this error originates in a macro outside of the current crate (in Nightly builds, run with -Z external-macro-backtrace for more info)