use std::marker::PhantomData; use yew::prelude::*; pub struct Generic { marker: PhantomData, } impl Component for Generic where T: 'static, { type Message = (); type Properties = (); fn create(_ctx: &Context) -> Self { unimplemented!() } fn view(&self, _ctx: &Context) -> Html { unimplemented!() } } pub struct Generic2 { marker: PhantomData<(T1, T2)>, } impl Component for Generic2 where T1: 'static, T2: 'static, { type Message = (); type Properties = (); fn create(_ctx: &Context) -> Self { unimplemented!() } fn view(&self, _ctx: &Context) -> Html { unimplemented!() }} fn compile_fail() { #[allow(unused_imports)] use std::path::Path; html! { > }; html! { > }; html! { >>> }; html! { >> }; html! { > }; } fn main() {}