Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- fn main() {
- let mut s1 = "Foo";
- let mut x = &mut s1;
- assert_eq!(*x, "Foo");
- {
- let mut s2 = "Bar";
- x = &mut s2;
- }
- assert_eq!(*x, "Bar");
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement