Skip to content

Commit

Permalink
Only enforce ABI-mandated align, not preferred align is compatible
Browse files Browse the repository at this point in the history
  • Loading branch information
compiler-errors committed Nov 18, 2022
1 parent b3da04a commit 39e076a
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -1070,7 +1070,7 @@ impl<'cx, 'tcx> SelectionContext<'cx, 'tcx> {
self.tcx().layout_of(ty::ParamEnv::empty().and(self.tcx().types.usize)).unwrap().layout;
if let Ok(layout) = self.tcx().layout_of(obligation.param_env.and(self_ty))
&& layout.layout.size() == usize_layout.size()
&& layout.layout.align() == usize_layout.align()
&& layout.layout.align().abi == usize_layout.align().abi
{
candidates.vec.push(BuiltinCandidate { has_nested: false });
}
Expand Down

0 comments on commit 39e076a

Please sign in to comment.