book icon indicating copy to clipboard operation
book copied to clipboard

An Example of Dynamically Sized Types Are Trait Objects, Not Traits

Open zehata opened this issue 2 months ago • 0 comments

  • I have searched open and closed issues and pull requests for duplicates, using these search terms:
    • trait
    • object
    • 20.3
  • I have checked the latest main branch to see if this has already been fixed, in this file:
    • https://github.com/rust-lang/book/blob/main/src/ch20-03-advanced-types.md?plain=1#L255-L258

URL to the section(s) of the book with this problem: https://doc.rust-lang.org/book/ch20-03-advanced-types.html#dynamically-sized-types-and-the-sized-trait

Description of the problem:

In fact, you’ve seen this before but with a different dynamically sized type: traits. Every trait is a dynamically sized type we can refer to by using the name of the trait.

From the context of the paragraph it appears that the dynamically sized type it is talking about is trait objects rather than traits.

Suggested fix:

- sized type: traits. Every trait is a dynamically sized type we can refer to by
+ sized type: trait objects. Every trait object is a dynamically sized type we can refer to by

zehata avatar Oct 19 '25 04:10 zehata