Explores a subtle limitation in Rust's trait solver where adding a redundant `where` clause to a trait implementation can cause the compiler to lose type information about associated types. The issue occurs specifically with parameterized types when trait bounds are explicitly stated in method signatures, causing the compiler to prefer the `where` clause version over the implicit trait bound from the `impl` block. This behavior isn't by design but rather an implementation limitation that could potentially be fixed.
Table of contents
The Issue #Trait bounds in method signatures in trait impls are weird #Trait bounds are promises callers make to callees #Trait bounds are capabilities callees rely on #Why’s it matter? #1 Comment
Sort: