Rust's RFC 3323 introduces two new features: impl_restriction and mut_restriction, now available for testing on nightly. The impl_restriction feature allows developers to explicitly limit the scope in which a trait can be implemented, replacing the verbose sealed trait pattern with a more direct syntax like impl(crate) trait Foo.
Background
Rust's evolution continues with RFC-driven language changes. The sealed trait pattern has long been used to restrict trait implementations, but it requires boilerplate. This RFC aims to provide first-class language support for such restrictions.
- Source
- Lobsters
- Published
- Aug 11, 2026 at 02:39 AM
- Score
- 6.0 / 10