Move refinement check out of compare_impl_item
This commit is contained in:
parent
a3623f20ae
commit
1e655ef213
5 changed files with 48 additions and 9 deletions
|
@ -219,6 +219,8 @@ fn resolve_associated_item<'tcx>(
|
|||
// We check that the impl item is compatible with the trait item
|
||||
// because otherwise we may ICE in const eval due to type mismatches,
|
||||
// signature incompatibilities, etc.
|
||||
// NOTE: We could also only enforce this in `PostAnalysis`, which
|
||||
// is what CTFE and MIR inlining would care about anyways.
|
||||
if trait_item_id != leaf_def.item.def_id
|
||||
&& let Some(leaf_def_item) = leaf_def.item.def_id.as_local()
|
||||
{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue