diff --git a/maple-core/src/lib.rs b/maple-core/src/lib.rs index ee1ca6a..c376db0 100644 --- a/maple-core/src/lib.rs +++ b/maple-core/src/lib.rs @@ -1,4 +1,5 @@ #![feature(associated_type_defaults, never_type, unsize, specialization)] +#![feature(generic_associated_types)] pub mod convert; pub mod engine; @@ -27,4 +28,4 @@ pub mod prelude { pub use crate::renderable::{Renderable, RenderImplementation, Stub}; pub use crate::node::Node; pub use crate::view::View; -} \ No newline at end of file +} diff --git a/maple-core/src/view.rs b/maple-core/src/view.rs index df3faa1..30aa784 100644 --- a/maple-core/src/view.rs +++ b/maple-core/src/view.rs @@ -12,10 +12,10 @@ pub trait View { type InputContext: Context; type OutputContext: Context; - type Renderable: Renderable; + type Renderable + 'static>: Renderable; fn receive_context(&mut self, ctx: Self::InputContext) -> Self::OutputContext; - fn build + 'static>(self, children: Option) -> Self::Renderable; + fn build + 'static>(self, children: Option) -> Self::Renderable; } // It will have sense when `specialization` will be ready to use