Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- fn foo(i: &mut i32) {
- // do stuff
- }
- fn main() {
- // I have to bring &mut behind a RAW DATA. not a variable.but RAWDATA
- // I have to deref i in foo before doing anything with it
- // which will give me this error: you cant deref an ineteger !!
- foo(&mut 10)
- foo(10) // I want to use this and I want rust be smart enough to deduce what does it mean
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement