Skip to content

Commit ccff8fd

Browse files
committed
Auto merge of #147512 - Zalathar:rollup-p8kb5f7, r=Zalathar
Rollup of 12 pull requests Successful merges: - rust-lang/rust#146568 (Port the implemention of SIMD intrinsics from Miri to const-eval) - rust-lang/rust#147373 (give a better example why `std` modules named like primitives are needed) - rust-lang/rust#147419 (bootstrap: add `Builder::rustc_cmd` that includes the lib path) - rust-lang/rust#147420 (Add diagnostic items for `pub mod consts` of FP types) - rust-lang/rust#147457 (specialize slice::fill to use memset when possible) - rust-lang/rust#147467 (Fix double warnings on `#[no_mangle]`) - rust-lang/rust#147470 (Clarify how to remediate the panic_immediate_abort error) - rust-lang/rust#147480 (Do not invalidate CFG caches in CtfeLimit.) - rust-lang/rust#147481 (format: some small cleanup) - rust-lang/rust#147488 (refactor: Remove `LLVMRustInsertPrivateGlobal` and `define_private_global`) - rust-lang/rust#147489 (Prefer to use repeat_n over repeat().take()) - rust-lang/rust#147506 (compiletest: Isolate public APIs and minimize public surface area) r? `@ghost` `@rustbot` modify labels: rollup
2 parents 7de51cc + 9e3bc3b commit ccff8fd

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

src/constant.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -318,7 +318,7 @@ fn data_id_for_static(
318318
let mut data = DataDescription::new();
319319
data.set_align(align);
320320
let data_gv = module.declare_data_in_data(data_id, &mut data);
321-
data.define(std::iter::repeat(0).take(pointer_ty(tcx).bytes() as usize).collect());
321+
data.define(std::iter::repeat_n(0, pointer_ty(tcx).bytes() as usize).collect());
322322
data.write_data_addr(0, data_gv, 0);
323323
match module.define_data(ref_data_id, &data) {
324324
// Every time the static is referenced there will be another definition of this global,

0 commit comments

Comments
 (0)