updated code comments re #20
This commit is contained in:
@@ -137,8 +137,8 @@ fn mul(s: &Data) -> i32 {
|
|||||||
fn main() {
|
fn main() {
|
||||||
let mut data = Data {a: 3, b: 2};
|
let mut data = Data {a: 3, b: 2};
|
||||||
// vtable is like special purpose array of pointer-length types with a fixed
|
// vtable is like special purpose array of pointer-length types with a fixed
|
||||||
// format where the three first values has a special meaning like the
|
// format where the three first values contains some general information like
|
||||||
// length of the array is encoded in the array itself as the second value.
|
// a pointer to drop and the length and data alignment of `data`.
|
||||||
let vtable = vec![
|
let vtable = vec![
|
||||||
0, // pointer to `Drop` (which we're not implementing here)
|
0, // pointer to `Drop` (which we're not implementing here)
|
||||||
size_of::<Data>(), // length of data
|
size_of::<Data>(), // length of data
|
||||||
|
|||||||
Reference in New Issue
Block a user