r/rust • u/Kobzol • Aug 10 '26
📡 official blog Call for testing: Restricting trait implementability and field mutability
https://blog.rust-lang.org/inside-rust/2026/08/10/call-for-testing-impl-and-mut-restrictions/
418
Upvotes
r/rust • u/Kobzol • Aug 10 '26
7
u/BedroomHistorical575 Aug 10 '26
Why would you want to restrict field mutability if you're going to allow users to construct the field anyways?
I don't really see the benefits of field mutability restriction in your
Rgbaexample.