If trait Subtrait: Super where Clause { }
then typeck should assume Clause, right?
#29143
Labels
A-associated-items
Area: Associated items (types, constants & functions)
A-type-system
Area: Type system
T-lang
Relevant to the language team, which will review and decide on the PR/issue.
Consider the following code:
The above compiles and runs fine, but one might well ask: Why did I need to put that
where
-clause onfn foo
? It is already present on thetrait Sub: Super where Self::A: Bound
, shouldn't the compiler thus infer that anyS:Sub
already satisfies that requirement?Unfortunately, if you try that out, it doesn't work:
yields:
playpen
The text was updated successfully, but these errors were encountered: