Skip to content

Add forward_list incompatible overloads - #25

Merged
teor2345 merged 3 commits into
mainfrom
incompatible-examples
Sep 23, 2026
Merged

teor2345 merged 3 commits into
mainfrom
incompatible-examples

Conversation

@teor2345

@teor2345 teor2345 commented Sep 23, 2026

Copy link
Copy Markdown
Collaborator

The overload incompatibilities rely on confusion between:

  • item: T = c_size_t and count: size_t arguments
  • item: T = Iterator and iter_from: Iterator arguments - would result in type cycles, but the trait solver might not care

I also included an example of poor ergonomics:

  • item: T = forward_list and other: &/&mut forward_list arguments - differs by &/&mut, but Rust has auto-ref and auto-deref

The initializer list overloads are the core problem here, this may become a pattern. But there isn't a strong equivalent of list initializers in Rust, so we could write these off as inexpressible.

@teor2345 teor2345 self-assigned this Sep 23, 2026
@teor2345 teor2345 added the enhancement New feature or request label Sep 23, 2026
@teor2345
teor2345 force-pushed the incompatible-examples branch from e63c1f0 to 3db3a3b Compare September 23, 2026 09:44
@teor2345
teor2345 enabled auto-merge September 23, 2026 10:25
@teor2345
teor2345 disabled auto-merge September 23, 2026 10:26
@teor2345
teor2345 merged commit 013e0d9 into main Sep 23, 2026
11 checks passed
@teor2345
teor2345 deleted the incompatible-examples branch September 23, 2026 10:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant