mirror of
https://github.com/yewstack/yew.git
synced 2025-12-08 21:26:25 +00:00
29 lines
573 B
Rust
29 lines
573 B
Rust
use yew::prelude::*;
|
|
|
|
fn compile_fail() {
|
|
// missing closing tag
|
|
html! { <> };
|
|
html! { <><> };
|
|
html! { <><></> };
|
|
|
|
// missing starting tag
|
|
html! { </> };
|
|
html! { </></> };
|
|
|
|
// multiple root nodes
|
|
html! { <></><></> };
|
|
// invalid child content
|
|
html! { <>invalid</> };
|
|
// no key value
|
|
html! { <key=></> };
|
|
// wrong closing tag
|
|
html! { <key="key".to_string()></key> };
|
|
|
|
// multiple keys
|
|
html! { <key="first key" key="second key" /> };
|
|
// invalid prop
|
|
html! { <some_attr="test"></> };
|
|
}
|
|
|
|
fn main() {}
|