Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- fn main () {
- let mut bar = Bar{};
- hello(&Context{
- bar: &mut bar
- })
- }
- struct Context<'a> {
- bar: &'a mut Bar
- }
- struct Bar {
- }
- impl Bar {
- fn muty(&mut self) {
- }
- }
- fn hello(context: &Context) {
- context.bar.muty()
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement