Skip to content

Instantly share code, notes, and snippets.

@carols10cents
Forked from anonymous/playground.rs
Created May 23, 2016 20:21
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save carols10cents/1698dc9940c301207767e4cb87bcc848 to your computer and use it in GitHub Desktop.
Save carols10cents/1698dc9940c301207767e4cb87bcc848 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