Rust 語言之旅 目錄

[沒有翻譯] The * Operator

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: