Skip to content

Commit 8502f79

Browse files
committed
Auto merge of #140079 - ChrisDenton:rollup-2h5cg94, r=ChrisDenton
Rollup of 5 pull requests Successful merges: - #137953 (simd intrinsics with mask: accept unsigned integer masks, and fix some of the errors) - #139990 (transmutability: remove NFA intermediate representation) - #140044 (rustc-dev-guide subtree update) - #140051 (Switch exploit mitigations to mdbook footnotes) - #140054 (docs: fix typo change from inconstants to invariants) r? `@ghost` `@rustbot` modify labels: rollup
2 parents 5f4afd8 + c98df3a commit 8502f79

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

src/helpers.rs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1382,6 +1382,11 @@ pub(crate) fn bool_to_simd_element(b: bool, size: Size) -> Scalar {
13821382
}
13831383

13841384
pub(crate) fn simd_element_to_bool(elem: ImmTy<'_>) -> InterpResult<'_, bool> {
1385+
assert!(
1386+
matches!(elem.layout.ty.kind(), ty::Int(_) | ty::Uint(_)),
1387+
"SIMD mask element type must be an integer, but this is `{}`",
1388+
elem.layout.ty
1389+
);
13851390
let val = elem.to_scalar().to_int(elem.layout.size)?;
13861391
interp_ok(match val {
13871392
0 => false,

0 commit comments

Comments
 (0)