We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent cc00f45 commit 0e4df74Copy full SHA for 0e4df74
src/constant.rs
@@ -318,7 +318,7 @@ fn data_id_for_static(
318
let mut data = DataDescription::new();
319
data.set_align(align);
320
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());
+ data.define(std::iter::repeat_n(0, pointer_ty(tcx).bytes() as usize).collect());
322
data.write_data_addr(0, data_gv, 0);
323
match module.define_data(ref_data_id, &data) {
324
// Every time the static is referenced there will be another definition of this global,
0 commit comments