You've already forked comprehensive-rust
mirror of
https://github.com/google/comprehensive-rust.git
synced 2025-06-26 18:51:00 +02:00
I've been thinking it'd be simpler to introduce `dyn Trait` via `&dyn Trait` rather than waiting for the smart pointers section and `Box<dyn Trait>`. This PR adds a slide to the Generics section that introduces `&dyn Trait` and compares it to `&impl Trait`, juxtaposing monomorphization and static dispatch against type-erasure and dynamic dispatch. I've then updated the existing trait object slide to call back to the earlier introduction, and call out that using `Box<dyn Trait>` gives you an owned trait object rather than a borrowed one.
Course Content
The files in this directory make up the content of the course. The files here
can include third-party content from ../third_party/
as well.
When we publish a translation of the course, we git restore
the src/
and
third_party/
directories at the repository root back to the date listed in the
POT-Creation-Date header of the translation. It is crucial, that all
translatable content lives in those two directories. The other files (such as
book.toml
and theme/
) are not restored and we always use the latest version
of them.