File tree 1 file changed +7
-5
lines changed
1 file changed +7
-5
lines changed Original file line number Diff line number Diff line change @@ -3387,11 +3387,12 @@ more of the closure traits:
3387
3387
### Trait objects
3388
3388
3389
3389
Every trait item (see [ traits] ( #traits ) ) defines a type with the same name as
3390
- the trait. This type is called the _ trait object_ of the trait. Trait objects
3391
- permit "late binding" of methods, dispatched using _ virtual method tables_
3392
- ("vtables"). Whereas most calls to trait methods are "early bound" (statically
3393
- resolved) to specific implementations at compile time, a call to a method on an
3394
- trait objects is only resolved to a vtable entry at compile time. The actual
3390
+ the trait. Traits that are object-safe (see [ RFC 255] [ rfc255 ] ) can be
3391
+ instantiated as _ trait objects_ , which permit "late binding" of methods,
3392
+ dispatched using _ virtual method tables_ ("vtables"). Whereas most calls to
3393
+ trait methods are "early bound" (statically resolved) to specific
3394
+ implementations at compile time, a call to a method on an trait objects is
3395
+ only resolved to a vtable entry at compile time. The actual
3395
3396
implementation for each vtable entry can vary on an object-by-object basis.
3396
3397
3397
3398
Given a pointer-typed expression ` E ` of type ` &T ` or ` Box<T> ` , where ` T `
@@ -3679,3 +3680,4 @@ that have since been removed):
3679
3680
3680
3681
[ ffi ] : book/ffi.html
3681
3682
[ plugin ] : book/compiler-plugins.html
3683
+ [ rfc255 ] : https://github.com/rust-lang/rfcs/blob/master/text/0255-object-safety.md
You can’t perform that action at this time.
0 commit comments