Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #![feature(nll)]
- trait MyTrait {}
- struct Foo {}
- impl MyTrait for Foo {}
- struct Bar<'a> {
- things: Vec<&'a MyTrait>,
- }
- impl<'a> MyTrait for Bar<'a> {}
- fn main() {
- let bar = Bar {
- things: vec![&Foo {}, &Bar { things: vec![] }],
- };
- }
Add Comment
Please, Sign In to add comment