The *
operator is an explicit way to dereference a reference.
let a: i32 = 42;
let ref_ref_ref_a: &&&i32 = &&&a;
let ref_a: &i32 = **ref_ref_ref_a;
let b: i32 = *ref_a;
Memory detail:
Copy
trait,
the bytes of variable a
on stack are copied into the bytes of variable b
.