diff --git a/src/constant.rs b/src/constant.rs index a4177552cb3..861526653c0 100644 --- a/src/constant.rs +++ b/src/constant.rs @@ -165,7 +165,7 @@ fn trans_const_place<'a, 'tcx: 'a>( fn data_id_for_alloc_id(module: &mut Module, alloc_id: AllocId) -> DataId { module - .declare_data(&alloc_id.0.to_string(), Linkage::Local, false) + .declare_data(&format!("__alloc_{}", alloc_id.0), Linkage::Local, false) .unwrap() }