Closed as not planned
Closed as not planned
Description
I tried this code: https://play.rust-lang.org/?version=stable&mode=debug&edition=2018&gist=a9fcf72c4bbeb63baf3dffb724d37852
I expected it to compile successfully.
Instead, it fails to compile with the error:
error[E0277]: the trait bound `&'a <C as Container>::Item: From<&'a Wrapper>` is not satisfied
I do not expect that a From
implementation is needed when implementing TryFrom
.
If I remove the trait bound from the trait Container
, and place it on the function foo
instead, it works as expected: https://play.rust-lang.org/?version=stable&mode=debug&edition=2018&gist=a4bdca2f01cd2a33f85d18e5ebdb5181
Also, if the trait bound is changed to not include lifetimes or references, this works as well: https://play.rust-lang.org/?version=stable&mode=debug&edition=2018&gist=a2e8dbad7838e71b6c0b8a42fca57509
The issue happens on both Beta and Nightly.