Rust incorrectly concludes that trait is not implemented #82252
Labels
A-associated-items
Area: Associated items (types, constants & functions)
A-trait-system
Area: Trait system
C-bug
Category: This is a bug.
E-needs-test
Call for participation: An issue has been fixed and does not reproduce, but no test has been added.
T-compiler
Relevant to the compiler team, which will review and decide on the PR/issue.
T-types
Relevant to the types team, which will review and decide on the PR/issue.
Suppose I have a function:
Here, for some reason, Rust refuses to infer that
<T as TryFrom<&'a U64>>::Error
implements Debug. Can be checked by adding more code:If we replace main function with:
then it will be compiled, so Rust is able to infer that TooLargeErr implements Debug, but it doesn't do the same in generic bounds.
Here's a link on playground
Meta
Reproduces at Rust 1.50.0 stable, beta, nightly
The text was updated successfully, but these errors were encountered: