rsproject/Relm4-0.6.2/relm4-macros/tests/ui/compile-fail/no-view-output.rs
2024-03-02 00:19:08 +08:00

30 lines
491 B
Rust

use relm4::prelude::*;
struct AppModel;
#[relm4_macros::component]
impl SimpleComponent for AppModel {
type Init = ();
type Input = ();
type Output = ();
view! {
gtk::Window {}
}
#[allow(unreachable_code)]
fn init(
_: (),
root: &Self::Root,
sender: ComponentSender<Self>,
) -> ComponentParts<Self> {
let model = Self;
let widgets = todo!();
ComponentParts { model, widgets }
}
}
fn main() {}