Skip to content

Rust: Refine implSiblings#21703

Draft
hvitved wants to merge 1 commit intogithub:mainfrom
hvitved:rust/type-inference-sibling
Draft

Rust: Refine implSiblings#21703
hvitved wants to merge 1 commit intogithub:mainfrom
hvitved:rust/type-inference-sibling

Conversation

@hvitved
Copy link
Copy Markdown
Contributor

@hvitved hvitved commented Apr 13, 2026

#21206 follow-up.

Consider two implementations of the same trait to be siblings when the type being implemented by one is an instantiation of the type being implemented by the other.

For example, in

trait MyTrait<T> { ... }
impl MyTrait<i64> for i64 { ... }    // I1
impl MyTrait<u64> for i64 { ... }    // I2

impl MyTrait<i64> for S<i64> { ... } // I3
impl MyTrait<u64> for S<u64> { ... } // I4
impl MyTrait<bool> for S<T> { ... }  // I5

the pairs (I1, I2), (I3, I5), and (I4, I5) are siblings, but not (I3, I4).

@github-actions github-actions Bot added the Rust Pull requests that update Rust code label Apr 13, 2026
@hvitved hvitved force-pushed the rust/type-inference-sibling branch 4 times, most recently from 87447fb to d6ff5b1 Compare April 22, 2026 08:13
Consider two implementations of the same trait to be siblings when the
type being implemented by one is an instantiation of the type being
implemented by the other.
@hvitved hvitved force-pushed the rust/type-inference-sibling branch from d6ff5b1 to e60275c Compare April 22, 2026 11:34
@hvitved hvitved changed the title Rust: Refine implHasAmbiguousSiblingAt Rust: Refine implSiblings Apr 22, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Rust Pull requests that update Rust code

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants