about summary refs log tree commit diff
path: root/tests/mir-opt/lower_array_len.array_bound.NormalizeArrayLen.diff
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2023-01-16 12:56:35 +0000
committerbors <bors@rust-lang.org>2023-01-16 12:56:35 +0000
commit27c9c2fcaf57907862419751e11dbb600bfc77de (patch)
tree99a498b74b28d6d129790f7a210c304e311a8c25 /tests/mir-opt/lower_array_len.array_bound.NormalizeArrayLen.diff
parentff4d55e480470fd6e3c3c003703612294fd09d15 (diff)
parentfc56cacfc1c0e94e5fee6d876fdcdcf3e01f6b66 (diff)
downloadrust-27c9c2fcaf57907862419751e11dbb600bfc77de.tar.gz
rust-27c9c2fcaf57907862419751e11dbb600bfc77de.zip
Auto merge of #13961 - lowr:fix/impl-missing-members-type-neq, r=Veykril
fix: don't generate `PartialEq`/`PartialOrd` methods body for types don't match

Fixes #12985

This PR changes the implementation of well-known trait methods body generation so that it takes generic arguments of traits into account and does not generate `PartialEq`/`PartialOrd` methods body when the self type and rhs type don't match.

I took this opportunity to add `hir::TraitRef`, which has been suggested by a FIXME note. I didn't change the signature of the existing method `hir::Impl::trait_(self, db) -> Option<Trait>` as suggested by FIXME but added a new method because you quite often only want to know the trait rather than `TraitRef`s.
Diffstat (limited to 'tests/mir-opt/lower_array_len.array_bound.NormalizeArrayLen.diff')
0 files changed, 0 insertions, 0 deletions