1 // build-pass (FIXME(62277): could be check-pass?)
3 #![allow(unused_variables)]
11 trait Component: 'static {}
12 impl Component for Engine {}
15 fn get_component_type_id(&self, type_id: TypeId) -> Option<Fp<dyn Component>>;
18 impl<'a> dyn Env + 'a {
19 fn get_component<T: Component>(&self) -> Option<Fp<T>> {
20 let x = self.get_component_type_id(TypeId::of::<T>());
26 fn init(&mut self, env: &dyn Env);
31 impl Figment for MyFigment {
32 fn init(&mut self, env: &dyn Env) {
33 let engine = env.get_component::<Engine>();