Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

That actually lets you change what y points at, but you can't mutate x through y. If you want to mutate x, you need something like

    let y = &mut x;
which will result in an error due to x not being mutable.


Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: