Re:Announcing Rust 1.22
by gpderetta on Thursday November 23, 2017 @09:16AM
(#15765171)
It is exactly the same between the two cases: the x object (either the array memory location or the integer memory location) can be changed by 'f' because mentioning the 'x' object name in a function call may implicitly converts to the address of the object, i.e. it passes by reference).
[ Parent
| on HN ]
Re:Announcing Rust 1.22
by fredmorcos on Thursday November 23, 2017 @10:51AM
(#15765757)
> can be changed by 'f' because mentioning the 'x' object name in a function call may implicitly converts to the address of the object
(1) They are two different types and (2) it's clear to you at the calling site!