Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- pub trait A {
- fn foo<'a>(self) -> Foo<'a>;
- }
- pub enum Foo<'a> {
- Bar(B<'a>),
- Baz(C<'a>),
- }
- pub struct B<'a> {
- b: &'a str,
- }
- pub struct C<'a> {
- c: &'a str,
- }
- impl<'b> A for C<'b> {
- fn foo<'a>(self) -> Foo<'a> {
- Foo(C {
- c: self.b,
- })
- }
- }
- fn main() {}
Add Comment
Please, Sign In to add comment