109If only some methods aren't dyn-compatible, you can add a `where Self: Sized`
110bound on them to mark them as explicitly unavailable to trait objects. The
111▶functionality will still be available to all other implementers, including
112`Box<dyn Trait>` which is itself sized (assuming you `impl Trait for Box<dyn
113Trait>`).
· · ·
116trait Trait {
117 fn foo(&self) -> Self where Self: Sized;
118▶ // more functions
119}
120```
· · ·
171type parameters, the number of monomorphized implementations the compiler
172generates does not grow drastically, since the compiler will only generate an
173▶implementation if the function is called with fully concrete arguments
174(i.e., arguments which do not contain any generic parameters).
175
· · ·
264### Trait contains associated constants
265
266▶Just like static functions, associated constants aren't stored on the method
267table. If the trait or any subtrait contain an associated constant, they are not
268dyn compatible.
· · ·
301impl Trait for Foo {}
302
303▶fn main() {
304 let x: Box<dyn Trait>;
305}
+ 1 more matches in this file