@@ -155,7 +155,7 @@ needs to make about its arguments.
155155
156156
157157<a id= "c- object"></ a>
158- ## Traits are object - safe if they may be useful as a trait object (C - OBJECT )
158+ ## Traits are dyn - compatible if they may be useful as a trait object (C - OBJECT )
159159
160160Trait objects have some significant limitations: methods invoked through a trait
161161object cannot use generics, and cannot use `Self ` except in receiver position.
@@ -167,25 +167,25 @@ If a trait is meant to be used as an object, its methods should take and return
167167trait objects rather than use generics.
168168
169169A `where ` clause of `Self : Sized ` may be used to exclude specific methods from
170- the trait 's object. The following trait is not object - safe due to the generic
170+ the trait 's object. The following trait is not dyn - compatible due to the generic
171171method.
172172
173173```rust
174174trait MyTrait {
175- fn object_safe (& self , i: i32 );
175+ fn dyn_compatible (& self , i: i32 );
176176
177- fn not_object_safe <T >(& self , t : T );
177+ fn not_dyn_compatible <T >(& self , t : T );
178178}
179179```
180180
181181Adding a requirement of ` Self: Sized ` to the generic method excludes it from the
182- trait object and makes the trait object-safe .
182+ trait object and makes the trait dyn-compatible .
183183
184184``` rust
185185trait MyTrait {
186- fn object_safe (& self , i : i32 );
186+ fn dyn_compatible (& self , i : i32 );
187187
188- fn not_object_safe <T >(& self , t : T ) where Self : Sized ;
188+ fn not_dyn_compatible <T >(& self , t : T ) where Self : Sized ;
189189}
190190```
191191
0 commit comments