In Rust, if expressions are not place expressions. In the example, arr_ref is a reference to a temporary, not to an array element. In Rust, it is possible to take an address of any expression, but taking an address of a value expression will produce an address of a temporary.
John23832|1 year ago
eddyb|1 year ago
justincredible|1 year ago
[deleted]