Skip to content

Commit 47abd3a

Browse files
authored
Rollup merge of #122287 - RalfJung:simd-static-assert, r=pnkfelix
add test ensuring simd codegen checks don't run when a static assertion failed stdarch relies on this to ensure that SIMD indices are in bounds. I would love to know why this works, but I can't figure out where codegen decides to not codegen a function if a required-const does not evaluate. `@oli-obk` `@bjorn3` do you have any idea?
2 parents 221402e + fe7be63 commit 47abd3a

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/constant.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ pub(crate) fn eval_mir_constant<'tcx>(
7171
// This cannot fail because we checked all required_consts in advance.
7272
let val = cv
7373
.eval(fx.tcx, ty::ParamEnv::reveal_all(), Some(constant.span))
74-
.expect("erroneous constant not captured by required_consts");
74+
.expect("erroneous constant missed by mono item collection");
7575
(val, cv.ty())
7676
}
7777

0 commit comments

Comments
 (0)