📅  最后修改于: 2022-03-11 14:57:16.447000             🧑  作者: Mango
trait Foo { }
pub struct A {}
pub struct B {}
impl Foo for A {}
impl Foo for B {}
type FooT = Box;
fn test() -> Vec {
let mut generic_vec: Vec = Vec::new();
generic_vec.push(Box::new(A {}));
generic_vec.push(Box::new(B {}));
return generic_vec;
}