From ff09d34b841115bdb128c96d5c4d925c6400c6ee Mon Sep 17 00:00:00 2001 From: lcnr Date: Tue, 16 Jun 2026 12:36:59 +0200 Subject: [PATCH 01/10] remove unnecessary comments --- src/2026/supertrait-auto-impl.md | 8 -------- 1 file changed, 8 deletions(-) diff --git a/src/2026/supertrait-auto-impl.md b/src/2026/supertrait-auto-impl.md index 4f312e34..ad8ff98d 100644 --- a/src/2026/supertrait-auto-impl.md +++ b/src/2026/supertrait-auto-impl.md @@ -60,8 +60,6 @@ impl BigTrait for MyType { ### The status quo -> *Elaborate in more detail about the problem you are trying to solve. This section is making the case for why this particular problem is worth prioritizing with project bandwidth. A strong status quo section will (a) identify the target audience and (b) give specifics about the problems they are facing today. Sometimes it may be useful to start sketching out how you think those problems will be addressed by your change, as well, though it's not necessary.* - Supertrait `auto impl` targets library authors who needs to refactor traits or design a trait hierarchy. A recurring topic arising from this activity is that with refined trait granularity, or smaller traits in other words, also comes many required `impl`s. The problem exacerbates when it is an upstream trait receiving a refactor. While this is rightfully a breaking change, downstream crates would also have to move trait items into new `impl` blocks as the original trait is broken into smaller supertraits. This major rewrite is often undesirable for library authors as this would discourage downstream users to upgrade the library. For standard library, this often means that the changes can only land on an Edition boundary. ### The next 6 months @@ -73,12 +71,6 @@ Supertrait `auto impl` targets library authors who needs to refactor traits or d ### The "shiny future" we are working towards -> *If this goal is part of a larger plan that will extend beyond this goal period, sketch out the goal you are working towards. It may be worth adding some text about why these particular goals were chosen as the next logical step to focus on.* -> -> *This text is NORMATIVE, in the sense that teams should review this and make sure they are aligned. If not, then the shiny future should be moved to frequently asked questions with a title like "what might we do next".* - -*However, for most proposals, alignment on exact syntax should not be required to start a goal, only alignment on the problem and the general sketch of the solution. This may vary for goals that are specifically about syntax, such as ergonomic improvements.* - We would like to establish a mechanism in the language to automatically derive the required supertrait implementation using the items available in the subtrait implementation. The first step is to enable the resolution of the supertrait associated items in the subtrait implementation block to the corresponding supertraits when there is no risk of ambiguity. `auto impl` blocks follows so that the default supertrait implementation could be supplied from the supertrait definition. We will also propose a feature to allow downstream trait users with explicit opt-out of the default supertrait implementation in case of overlapping implementation or need for customisation. From 1e1d84b8fe8d4d3ce91b1acdcca3021bd5025624 Mon Sep 17 00:00:00 2001 From: lcnr Date: Tue, 16 Jun 2026 12:55:24 +0200 Subject: [PATCH 02/10] add a library trait evolution initiative goal --- .../library-trait-evolution-initiative.md | 50 +++++++++++++++++++ 1 file changed, 50 insertions(+) create mode 100644 src/2026/library-trait-evolution-initiative.md diff --git a/src/2026/library-trait-evolution-initiative.md b/src/2026/library-trait-evolution-initiative.md new file mode 100644 index 00000000..348e6796 --- /dev/null +++ b/src/2026/library-trait-evolution-initiative.md @@ -0,0 +1,50 @@ +# Library Trait Evolution Initiative + + +| Metadata | | +| :--------------- | -------------------------------------------------------------------------------- | +| Point of contact | @lcnr | +| What and why | Enable library authors to more easily change their trait definitions | +| Status | Proposed | +| Tracking issue | *if this is a continuing goal, add the old tracking issue, else leave blank* | +| Zulip channel | N/A (an existing stream can be re-used or new streams can be created on request) | +| Funding contact | [Hexcat](https://hexcat.nl/) | + +## Summary + +Setup a Library Trait Evolution Initiative. This initiative works to unify the design of language features to make trait definitions less rigid. This includes [refined trait implementations](https://github.com/rust-lang/rfcs/pull/3245) and [Supertrait Auto-impl](https://github.com/rust-lang/rfcs/pull/3851), but also more targeted features for the standard library, such as [`#[rustc_must_implement_one_of]`](https://github.com/rust-lang/rust/issues/107460). + +We plan to collect different use-cases and requirements here, both from the standard library and the wider ecosystem. We then use this to design, implement, and stabilize features solving these issues. + +## Motivation + +### The status quo + +Trait evolution and trait hierarchy refactoring is a long-time pain point for Rust crates and especially the standard library. As crates evolve and grow, needs to restructure trait hierarchy to accommodate richer functionality often arises, both in the standard library and the broader Rust ecosystem. + +This will be even more of an issue once we add new *implicit default auto trait bounds* to support [Immobile types and guaranteed destructors](https://rust-lang.github.io/rust-project-goals/2026/move-trait.html) or the [Sized Hierarchy](https://rust-lang.github.io/rust-project-goals/2026/scalable-vectors.html). For example in `trait Trait { fn foo(); }` the generic parameter `T` will get an implicit `T: Move` bound whose removal is a breaking change. This makes immobile types a lot less useable with existing traits. + +### Work items over the next year + + +| Task | Owner(s) | Notes | +| ----------- | -------- | ----- | +| Collect and explore different use-cases in a single repository | @lcnr | +| Collaborate on the design and implementation of language features to solve these issues | @lcnr | + + +## Team asks + +| Team | Support level | Notes | +| ---------- | ------------- | --------------------------------------- | +| [lang] | Medium | Probably want to have a lang meeting at some point | | +| [libs] | Small | We would like to test some of the desired standard library changes and get input on the design | +| [types] | Medium | Review and discuss type system changes if required | + +## Funding + +| Purpose | Cost | Funded | Sponsor(s) | +|-------------------|------|--------|----------------| +| Contributor | Ask | Partial | | + +## Frequently asked questions From d16ecba62ef248c8a2871bdb07c11d02259b1274 Mon Sep 17 00:00:00 2001 From: lcnr Date: Tue, 16 Jun 2026 13:03:00 +0200 Subject: [PATCH 03/10] cool --- src/2026/library-trait-evolution-initiative.md | 1 + 1 file changed, 1 insertion(+) diff --git a/src/2026/library-trait-evolution-initiative.md b/src/2026/library-trait-evolution-initiative.md index 348e6796..e5664eab 100644 --- a/src/2026/library-trait-evolution-initiative.md +++ b/src/2026/library-trait-evolution-initiative.md @@ -29,6 +29,7 @@ This will be even more of an issue once we add new *implicit default auto trait | Task | Owner(s) | Notes | | ----------- | -------- | ----- | +| Setup a Library Trait Evolution Initiative and create its repository | @lcnr | | Collect and explore different use-cases in a single repository | @lcnr | | Collaborate on the design and implementation of language features to solve these issues | @lcnr | From 6f883c1f1b0cf7b1e0943b508127e3f599c82f3f Mon Sep 17 00:00:00 2001 From: lcnr Date: Tue, 16 Jun 2026 13:08:21 +0200 Subject: [PATCH 04/10] wooops --- src/2026/library-trait-evolution-initiative.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/2026/library-trait-evolution-initiative.md b/src/2026/library-trait-evolution-initiative.md index e5664eab..e5355ae6 100644 --- a/src/2026/library-trait-evolution-initiative.md +++ b/src/2026/library-trait-evolution-initiative.md @@ -38,7 +38,7 @@ This will be even more of an issue once we add new *implicit default auto trait | Team | Support level | Notes | | ---------- | ------------- | --------------------------------------- | -| [lang] | Medium | Probably want to have a lang meeting at some point | | +| [lang] | Medium | Probably want to have a lang meeting at some point | | [libs] | Small | We would like to test some of the desired standard library changes and get input on the design | | [types] | Medium | Review and discuss type system changes if required | From 4cac4ef8e7b368f9817956f270f7f85fde9c968a Mon Sep 17 00:00:00 2001 From: lcnr Date: Tue, 16 Jun 2026 13:14:41 +0200 Subject: [PATCH 05/10] Update src/2026/library-trait-evolution-initiative.md Co-authored-by: Nurzhan Saken --- src/2026/library-trait-evolution-initiative.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/2026/library-trait-evolution-initiative.md b/src/2026/library-trait-evolution-initiative.md index e5355ae6..1af9b058 100644 --- a/src/2026/library-trait-evolution-initiative.md +++ b/src/2026/library-trait-evolution-initiative.md @@ -6,7 +6,7 @@ | Point of contact | @lcnr | | What and why | Enable library authors to more easily change their trait definitions | | Status | Proposed | -| Tracking issue | *if this is a continuing goal, add the old tracking issue, else leave blank* | +| Tracking issue | | | Zulip channel | N/A (an existing stream can be re-used or new streams can be created on request) | | Funding contact | [Hexcat](https://hexcat.nl/) | From 27b6b69e28527522f12c8594a9df9c9dbb0fdf11 Mon Sep 17 00:00:00 2001 From: Tomas Sedovic Date: Wed, 24 Jun 2026 15:14:49 +0200 Subject: [PATCH 06/10] Add tmandry as the lang champion --- src/2026/library-trait-evolution-initiative.md | 1 + 1 file changed, 1 insertion(+) diff --git a/src/2026/library-trait-evolution-initiative.md b/src/2026/library-trait-evolution-initiative.md index 1af9b058..e2c3c256 100644 --- a/src/2026/library-trait-evolution-initiative.md +++ b/src/2026/library-trait-evolution-initiative.md @@ -8,6 +8,7 @@ | Status | Proposed | | Tracking issue | | | Zulip channel | N/A (an existing stream can be re-used or new streams can be created on request) | +| [lang] champion | @tmandry | | Funding contact | [Hexcat](https://hexcat.nl/) | ## Summary From fe66f88f1c58ed767840d3dc20bc591d37748635 Mon Sep 17 00:00:00 2001 From: Tomas Sedovic Date: Wed, 24 Jun 2026 15:15:09 +0200 Subject: [PATCH 07/10] s/initiative/experiment/g --- src/2026/library-trait-evolution-initiative.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/2026/library-trait-evolution-initiative.md b/src/2026/library-trait-evolution-initiative.md index e2c3c256..f9f28a25 100644 --- a/src/2026/library-trait-evolution-initiative.md +++ b/src/2026/library-trait-evolution-initiative.md @@ -1,4 +1,4 @@ -# Library Trait Evolution Initiative +# Library Trait Evolution Experiment | Metadata | | @@ -13,7 +13,7 @@ ## Summary -Setup a Library Trait Evolution Initiative. This initiative works to unify the design of language features to make trait definitions less rigid. This includes [refined trait implementations](https://github.com/rust-lang/rfcs/pull/3245) and [Supertrait Auto-impl](https://github.com/rust-lang/rfcs/pull/3851), but also more targeted features for the standard library, such as [`#[rustc_must_implement_one_of]`](https://github.com/rust-lang/rust/issues/107460). +Setup a Library Trait Evolution experiment. It works to unify the design of language features to make trait definitions less rigid. This includes [refined trait implementations](https://github.com/rust-lang/rfcs/pull/3245) and [Supertrait Auto-impl](https://github.com/rust-lang/rfcs/pull/3851), but also more targeted features for the standard library, such as [`#[rustc_must_implement_one_of]`](https://github.com/rust-lang/rust/issues/107460). We plan to collect different use-cases and requirements here, both from the standard library and the wider ecosystem. We then use this to design, implement, and stabilize features solving these issues. @@ -30,7 +30,7 @@ This will be even more of an issue once we add new *implicit default auto trait | Task | Owner(s) | Notes | | ----------- | -------- | ----- | -| Setup a Library Trait Evolution Initiative and create its repository | @lcnr | +| Setup a Library Trait Evolution experiment and create its repository | @lcnr | | Collect and explore different use-cases in a single repository | @lcnr | | Collaborate on the design and implementation of language features to solve these issues | @lcnr | From f5e49fc55cb33961772542e31b1ca92eb9b10761 Mon Sep 17 00:00:00 2001 From: Tomas Sedovic Date: Thu, 25 Jun 2026 16:20:25 +0200 Subject: [PATCH 08/10] Shorten the goal's Zulip channel body --- src/2026/library-trait-evolution-initiative.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/2026/library-trait-evolution-initiative.md b/src/2026/library-trait-evolution-initiative.md index f9f28a25..989bd59e 100644 --- a/src/2026/library-trait-evolution-initiative.md +++ b/src/2026/library-trait-evolution-initiative.md @@ -7,7 +7,7 @@ | What and why | Enable library authors to more easily change their trait definitions | | Status | Proposed | | Tracking issue | | -| Zulip channel | N/A (an existing stream can be re-used or new streams can be created on request) | +| Zulip channel | N/A | | [lang] champion | @tmandry | | Funding contact | [Hexcat](https://hexcat.nl/) | From 544603f8a3b499eb7d743b5d64087da9a749b57a Mon Sep 17 00:00:00 2001 From: Tomas Sedovic Date: Thu, 25 Jun 2026 16:21:49 +0200 Subject: [PATCH 09/10] Change "initiative" to "experiment" in the filename too --- ...lution-initiative.md => library-trait-evolution-experiment.md} | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename src/2026/{library-trait-evolution-initiative.md => library-trait-evolution-experiment.md} (100%) diff --git a/src/2026/library-trait-evolution-initiative.md b/src/2026/library-trait-evolution-experiment.md similarity index 100% rename from src/2026/library-trait-evolution-initiative.md rename to src/2026/library-trait-evolution-experiment.md From 12687d042e042bb38ccdc8531c7771d5a735ebce Mon Sep 17 00:00:00 2001 From: lcnr Date: Mon, 29 Jun 2026 15:56:30 +0200 Subject: [PATCH 10/10] add myself as types champion --- src/2026/library-trait-evolution-experiment.md | 1 + 1 file changed, 1 insertion(+) diff --git a/src/2026/library-trait-evolution-experiment.md b/src/2026/library-trait-evolution-experiment.md index 989bd59e..7d533a18 100644 --- a/src/2026/library-trait-evolution-experiment.md +++ b/src/2026/library-trait-evolution-experiment.md @@ -9,6 +9,7 @@ | Tracking issue | | | Zulip channel | N/A | | [lang] champion | @tmandry | +| [types] champion | @lcnr | | Funding contact | [Hexcat](https://hexcat.nl/) | ## Summary