Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- use std::any::TypeId;
- struct Type {
- type_id: TypeId
- }
- struct Instance<'a> {
- t: &'a Type
- }
- impl <'a> Instance<'a>{
- fn new(t: &Type) -> Instance<'a> {
- Instance { // <-- how do I specify the runtime 'a of Instance here????
- t
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement