Description
I opened the issue #28055 last year thinking that I had found a inconsistency in the type checker. Recently, some one asked a question in stackoverflow that involves the same issue. The question is about the need to repeat the bound of a trait in a function that uses the trait. For example:
trait A { }
trait B {
type C;
}
trait D: B where Self::C: A { }
// does not compile, need to repeat the bound where T::C: A
fn f<T: D>(x: T) { }
@arielb1 closed the issue #28055 and wrote that it is the expected behavior. He also pointed which bounds are implicit available for function and wrote "I guess this should be a FAQ entry."
So, I'm opening this issue to register that this information need to be add to the docs (or FAQ).
One question for all: Do you agree with the justification "The thing is that we don't want too many bounds to be implicitly available for functions, as this can lead to fragility with distant changes causing functions to stop compiling"?