Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /*
- Assuming this code compiles:
- ```
- let n = &mut 42;
- foo(n);
- ```
- Does the following code compile?
- ```
- let n = &mut 42;
- foo(n);
- foo(n);
- ```
- */
- fn foo(x: &mut i32) {}
- fn main(){
- let n = &mut 42;
- foo(n);
- foo(n);
- }
Add Comment
Please, Sign In to add comment