|
|
|
|
|
by delta_p_delta_x
339 days ago
|
|
> Types don't carry behavioral information about what the method does internally. I was under the impression type inference meant that the implementation of a function directly determines the return type of a function, and therefore its signature and type. |
|
For the existence of any invocation of `<T as Clone>::clone()` in the method body to be encoded in the method signature, we'd either need some wild new syntax, or the compiler would need to be able to encode hidden information into types beyond what is visible to the programmer, which would make it very hard to reason about its behavior.