Is any RFC about the partial ordering of trait bound?

Consider we have multiple implementations(pseudo code)

impl<T: Trait0> MyStruct<T>{ // #1
   fn show(&self){}

impl<T: Trait0 + Trait1> MyStruct<T>{  // #2
   fn show(&self){}

If the given T satisfies both the requirements in #1 and #2, then #2 is used. Is any RFC about this feature?

Specialization, but the full RFC is unsound.

A sound subset is min specialization.

See also.

(Neither are stable.)


The blog sounds like the example in the question is not supported.

This topic was automatically closed 90 days after the last reply. We invite you to open a new topic if you have further questions or comments.