File tree Expand file tree Collapse file tree 1 file changed +3
-2
lines changed Expand file tree Collapse file tree 1 file changed +3
-2
lines changed Original file line number Diff line number Diff line change @@ -3564,8 +3564,9 @@ Each instance of a trait object includes:
3564
3564
each method of ` SomeTrait ` that ` T ` implements, a pointer to ` T ` 's
3565
3565
implementation (i.e. a function pointer).
3566
3566
3567
- The purpose of trait objects is to permit "late binding" of methods. A call to
3568
- a method on a trait object is only resolved to a vtable entry at runtime.
3567
+ The purpose of trait objects is to permit "late binding" of methods. Calling a
3568
+ method on a trait object results in virtual dispatch at runtime: that is, a
3569
+ function pointer is loaded from the trait object vtable and invoked indirectly.
3569
3570
The actual implementation for each vtable entry can vary on an object-by-object
3570
3571
basis.
3571
3572
You can’t perform that action at this time.
0 commit comments