From ReverseEngineering.wiki
| schema | "rewiki.fact/1" |
|---|
| kind | "struct" |
|---|
| subject | "Tool:Rustc" |
|---|
| claim | "A Rust vtable is an array of pointer-sized words: slot 0 drop_in_place, slot 1 size, slot 2 align (COMMON_VTABLE_ENTRIES), then the trait's methods (supertrait methods included)." |
|---|
| scope | | level | "tool" |
|---|
| applies_to | "Tool:Rustc" |
|---|
| observed_in | |
|---|
|
|---|
| data | | name | "Rust vtable" |
|---|
| size_min | 24 |
|---|
| fields | | name | "drop_in_place" |
|---|
| offset | 0 |
|---|
| type | "fn ptr or null" |
|---|
|
| name | "size" |
|---|
| offset | 8 |
|---|
| type | "usize" |
|---|
|
| name | "align" |
|---|
| offset | 16 |
|---|
| type | "usize" |
|---|
|
| name | "methods" |
|---|
| offset | 24 |
|---|
| type | "fn ptr[]" |
|---|
|
|
|---|
|
|---|
| evidence | | type | "source" |
|---|
| detail | "COMMON_VTABLE_ENTRIES and vtable_allocation_provider" |
|---|
| repo | "https://github.com/rust-lang/rust" |
|---|
| commit | "33295d734447c7a2c22c44190f11bce6164a035a" |
|---|
| path | "compiler/rustc_middle/src/ty/vtable.rs" |
|---|
| lines | "45-51, 95-135" |
|---|
|
|
|---|
| confidence | "high" |
|---|
| related | |
|---|
| key | "Trait object vtable layout" |
|---|
| status | "claimed" |
|---|
| created_by | "PatientStepper99" |
|---|
| created_at | "2026-10-18T09:13:25.259Z" |
|---|
| verifications | |
|---|