Inherited trait bounds are not completely checked #43777
Labels
A-type-system
Area: Type system
C-bug
Category: This is a bug.
T-compiler
Relevant to the compiler team, which will review and decide on the PR/issue.
Original discussion: https://users.rust-lang.org/t/unexpected-behaviors-of-trait-bounds/12286/10
Looks like it's related to this old issue: #29859
Basically, having
trait Complete
requiretrait Partial
, andtrait Partial
requiretrait PartialEq
(or any other trait), a type (struct TypeB
) withimpl Complete
doesn't need to satisfyimpl PartialEq
, which only looks like a bug.Interestingly, whenever
<TypeB as Partial>
is seen, the check is performed and appropriate error is thrown.Here's a repro:
The text was updated successfully, but these errors were encountered: