Guest User

Untitled

a guest
Sep 14th, 2018
95
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.27 KB | None | 0 0
  1. #![feature(unsize, coerce_unsized)]
  2. #![allow(unused)]
  3.  
  4. use std::ops::CoerceUnsized;
  5. use std::marker::Unsize;
  6. use std::any::Any;
  7.  
  8. struct Foo<T: ?Sized, U: ?Sized>(Box<T>, Box<U>);
  9.  
  10. impl<T: ?Sized + Unsize<U>, U: ?Sized> CoerceUnsized<Foo<dyn Any, dyn Any>> for Foo<T, U> {}
Add Comment
Please, Sign In to add comment