Skip to content

Instantly share code, notes, and snippets.

Created May 23, 2016 20:21
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save anonymous/6ed436f762c5c548a6d3345c88ece35f to your computer and use it in GitHub Desktop.
Save anonymous/6ed436f762c5c548a6d3345c88ece35f to your computer and use it in GitHub Desktop.
Shared via Rust Playground
fn main() {
let mut a_vec = vec![1, 2, 3];
let mut a_slice = &mut a_vec[..];
let ref mut an_item = a_slice[0];
let mut foo = &mut an_item;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment