Skip to content

Instantly share code, notes, and snippets.

@alexcrichton
Last active December 17, 2015 02:19
Show Gist options
  • Save alexcrichton/5534561 to your computer and use it in GitHub Desktop.
Save alexcrichton/5534561 to your computer and use it in GitHub Desktop.
struct A<'self> {
a: &'self mut B
}
struct B {
a: int
}
impl<'self> A<'self> {
fn foo(&self) {
self.a.i(); // error
self.a.m(); // error
}
}
impl B {
fn i(&self) {}
fn m(&mut self) {}
}
fn main() {}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment