Guest User

Untitled

a guest
Jan 23rd, 2019
74
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.20 KB | None | 0 0
  1. trait Test{}
  2.  
  3. struct A{}
  4. impl Test for A{}
  5. struct B{}
  6. impl Test for B{}
  7.  
  8. fn demo1<T>() -> Vec<Box<Test>> where T: Test {
  9. let l: Vec<Box<Test>> = vec![Box::new(A{}), Box::new(B{})];
  10. l
  11. }
  12.  
  13. fn main() {
  14. }
Add Comment
Please, Sign In to add comment