book
book copied to clipboard
ch17-02: Mmonomorphization applies to generics in general
trafficstars
- ~
Vec<T>denotes generic type with unconstrainedTtype parameter. As this chapter kindly describes Rust generics cannot hold 2 or more struct kinds.Vecis sufficient and proper at this place.~ - Beside trait bounds are discussed later in 10.2 not in 10.1, monomorphization relates to generics in general not only those bound by/to trait.
There is no Vec defined in the standard library, only Vec<T>. In this case, T becomes Box<dyn Draw>, it doesn't get rid of T.
If you remove that change, I'll consider merging the other change. Thanks!
I acknowledge my error. It is just type name, not any kind of declaration.