Skip to content

Commit

Permalink
Permit ImmTy::_offset to equally-sized aggreate fields if they are un…
Browse files Browse the repository at this point in the history
…inhabited
  • Loading branch information
saethlin committed Dec 10, 2023
1 parent eea05d4 commit 81c453d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion compiler/rustc_const_eval/src/interpret/operand.rs
Original file line number Diff line number Diff line change
Expand Up @@ -279,7 +279,7 @@ impl<'tcx, Prov: Provenance> ImmTy<'tcx, Prov> {
match (self.layout.abi, layout.abi) {
(Abi::Scalar(..), Abi::Scalar(..)) => true,
(Abi::ScalarPair(..), Abi::ScalarPair(..)) => true,
_ => false,
_ => layout.abi == Abi::Uninhabited,
},
"cannot project into {} immediate with equally-sized field {}\nouter ABI: {:#?}\nfield ABI: {:#?}",
self.layout.ty,
Expand Down

0 comments on commit 81c453d

Please sign in to comment.