Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- use std::marker::PhantomData;
- trait Lolka {}
- pub struct LolkaImpl;
- impl Lolka for LolkaImpl {}
- struct Instance<CFG=LolkaImpl> {
- _temp: PhantomData<CFG>
- }
- impl<CFG: Lolka> Instance<CFG> {
- pub fn new() -> Instance<CFG> {
- Self {
- _temp: PhantomData
- }
- }
- }
- fn main() {
- let test = Instance::new();
- }
Add Comment
Please, Sign In to add comment