Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- trait Test{}
- struct A{}
- impl Test for A{}
- struct B{}
- impl Test for B{}
- fn demo1<T>() -> Vec<Box<Test>> where T: Test {
- let l: Vec<Box<Test>> = vec![Box::new(A{}), Box::new(B{})];
- l
- }
- fn main() {
- }
Add Comment
Please, Sign In to add comment