Created
December 23, 2015 21:41
-
-
Save ebfull/2b9da9a0d9bacf801931 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
use std::rc::Rc; | |
trait Art<T, A: Adapton> {} | |
struct Location; | |
impl<T, A: Adapton> Art<T, A> for Location { } | |
trait Adapton { | |
fn put<T>(obj: T) -> Rc<Art<T, Self>>; | |
} | |
struct Engine; | |
impl Adapton for Engine { | |
fn put<T>(obj: T) -> Rc<Art<T, Engine>> { | |
Rc::new(Location) | |
} | |
} | |
fn main() { } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment