diff options
| author | Michael Goulet <michael@errs.io> | 2022-11-16 04:29:41 +0000 |
|---|---|---|
| committer | Michael Goulet <michael@errs.io> | 2022-11-18 18:23:48 +0000 |
| commit | 39e076a2e7df1407a58efa74bd46de60c7883941 (patch) | |
| tree | 58321a9cf8d982173a55c4bdbeecc983ac3f3151 | |
| parent | b3da04aa52d6e36d7db8666db9aeeaec316f1cc9 (diff) | |
Only enforce ABI-mandated align, not preferred align is compatible
| -rw-r--r-- | compiler/rustc_trait_selection/src/traits/select/candidate_assembly.rs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/compiler/rustc_trait_selection/src/traits/select/candidate_assembly.rs b/compiler/rustc_trait_selection/src/traits/select/candidate_assembly.rs index 4c6bb39d17b..e5b9ca67b1b 100644 --- a/compiler/rustc_trait_selection/src/traits/select/candidate_assembly.rs +++ b/compiler/rustc_trait_selection/src/traits/select/candidate_assembly.rs @@ -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 }); } |
