Enforce that PointerLike requires a pointer-like ABI
This commit is contained in:
@@ -221,8 +221,7 @@ impl<'tcx> assembly::GoalKind<'tcx> for TraitPredicate<'tcx> {
|
||||
let self_ty = tcx.erase_regions(goal.predicate.self_ty());
|
||||
|
||||
if let Ok(layout) = tcx.layout_of(goal.param_env.and(self_ty))
|
||||
&& layout.layout.size() == tcx.data_layout.pointer_size
|
||||
&& layout.layout.align().abi == tcx.data_layout.pointer_align.abi
|
||||
&& layout.layout.is_pointer_like(&tcx.data_layout)
|
||||
{
|
||||
// FIXME: We could make this faster by making a no-constraints response
|
||||
ecx.evaluate_added_goals_and_make_canonical_response(Certainty::Yes)
|
||||
|
||||
Reference in New Issue
Block a user