updated code comments re #20

This commit is contained in:
Carl Fredrik Samson
2020-08-23 23:22:06 +02:00
parent 734763b969
commit 2128fc83d6

View File

@@ -137,8 +137,8 @@ fn mul(s: &Data) -> i32 {
fn main() {
let mut data = Data {a: 3, b: 2};
// 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
// length of the array is encoded in the array itself as the second value.
// format where the three first values contains some general information like
// a pointer to drop and the length and data alignment of `data`.
let vtable = vec![
0, // pointer to `Drop` (which we're not implementing here)
size_of::<Data>(), // length of data