Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- use std::marker::PhantomData;
- struct Inner<'a> {
- _phantom: PhantomData<&'a ()>,
- }
- fn f<'a>(x: &'a mut Inner<'a>) {
- }
- fn main() {
- let mut x = Inner {
- _phantom: PhantomData,
- };
- f(&mut x);
- f(&mut x);
- }
Add Comment
Please, Sign In to add comment