You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I noticed that the term "object safety" has been renamed to "dyn compatible" as per rust-lang/lang-team#286, but the book is not updated and still use the (confusing?) terms "object safe" and "object safety".
[...] however, this would violate object safety, because the trait doesn’t know what the concrete self will be exactly. We want to be able to use State as a trait object, so we need its methods to be object safe.
[...] however, this would violate dyn compatibility, because the trait doesn’t know what the concrete self will be exactly. We want to be able to use State as a trait object, so we need its methods to be compatible with trait objects-this is known as dyn compatible.
We might also add a reference to the former term, for example:
[...]-this is known as dyn compatible. In older documentation, this concept is often referred to as object safety.
The text was updated successfully, but these errors were encountered:
Kajiih
added a commit
to Kajiih/rust-book
that referenced
this issue
May 6, 2025
main
branch to see if this has already been fixed, in this file:URL to the section(s) of the book with this problem: https://rust-book.cs.brown.edu/ch18-03-oo-design-patterns.html
Description of the problem:
I noticed that the term "object safety" has been renamed to "dyn compatible" as per rust-lang/lang-team#286, but the book is not updated and still use the (confusing?) terms "object safe" and "object safety".
Tracking issue for this change: rust-lang/rust#130852
Suggested fix:
We might also add a reference to the former term, for example:
The text was updated successfully, but these errors were encountered: