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?
This commit is contained in:
commit
6a4dd19ade
7 changed files with 56 additions and 8 deletions
|
@ -1112,6 +1112,9 @@ fn collect_and_partition_mono_items(tcx: TyCtxt<'_>, (): ()) -> (&DefIdSet, &[Co
|
|||
|
||||
let (items, usage_map) = collector::collect_crate_mono_items(tcx, collection_mode);
|
||||
|
||||
// If there was an error during collection (e.g. from one of the constants we evaluated),
|
||||
// then we stop here. This way codegen does not have to worry about failing constants.
|
||||
// (codegen relies on this and ICEs will happen if this is violated.)
|
||||
tcx.dcx().abort_if_errors();
|
||||
|
||||
let (codegen_units, _) = tcx.sess.time("partition_and_assert_distinct_symbols", || {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue