Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- fn main() {
- let v = vec![1, 2, 3];
- // Vector moved from v to v1
- let v1 = v;
- // Error when accessing v
- println!("{}", v[1]);
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement