Native sealed traits coming!
https://blog.rust-lang.org/inside-rust/2026/08/10/call-for-testing-impl-and-mut-restrictions/
Native sealed traits coming!
https://blog.rust-lang.org/inside-rust/2026/08/10/call-for-testing-impl-and-mut-restrictions/
@diondokter Mixed feelings. On one hand, mut restriction is something that's going to simplify my code. On the other hand, it adds more complexity to the language and puts nonobvious semantics on what used to be plain data fields.
@dcz I get that. But a different perspective is that it simplifies things too. You don't need a private field with a getter anymore. So the total api size has now decreased which makes it simpler (at the cost of an extra language feature yes)
Same with the trait sealing. You can already do this, it's just tedious.
@diondokter uuuhu... does `pub(crate) mut(super) x: bool` work? 🤔 not clear to me from the article...
@musicmatze time to test it out I guess! That's what the call for testing is for
@musicmatze @diondokter Yes, it is absolutely supported!