Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- struct A { field_a: i32 }
- struct B<'a> { field_b: &'a A }
- struct C<'b, 'a: 'b> { field_b: &'b mut B<'a> }
- trait Tr<'b, 'a> {
- fn field_b(&self) -> &'b B<'a>;
- }
- impl<'b, 'a> Tr<'b, 'a> for C<'b, 'a> {
- fn field_b(&self) -> &'b B<'a>{
- self.field_b
- }
- }
- fn main() {
- println!("Hello, world!");
- }
Add Comment
Please, Sign In to add comment