diff options
| author | Matthias Krüger <matthias.krueger@famsik.de> | 2024-08-31 14:46:14 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2024-08-31 14:46:14 +0200 |
| commit | 830b1deaeec6bff881c4a969ee1e5ddb1c156a0a (patch) | |
| tree | 3786c5de1594f23563dbc6e1755aacdd5b351140 /compiler/rustc_codegen_llvm/src | |
| parent | 5a61a7b904e1ca1b1335ae6076267a6dde64e1b9 (diff) | |
| parent | d0aedfbb900309bb633b3ba04bf008183cfdd9a7 (diff) | |
| download | rust-830b1deaeec6bff881c4a969ee1e5ddb1c156a0a.tar.gz rust-830b1deaeec6bff881c4a969ee1e5ddb1c156a0a.zip | |
Rollup merge of #129812 - RalfJung:box-custom-alloc, r=compiler-errors
interpret, codegen: tweak some comments and checks regarding Box with custom allocator Cc https://github.com/rust-lang/rust/issues/95453
Diffstat (limited to 'compiler/rustc_codegen_llvm/src')
| -rw-r--r-- | compiler/rustc_codegen_llvm/src/debuginfo/metadata.rs | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/compiler/rustc_codegen_llvm/src/debuginfo/metadata.rs b/compiler/rustc_codegen_llvm/src/debuginfo/metadata.rs index dc59e9349b0..17a9630c655 100644 --- a/compiler/rustc_codegen_llvm/src/debuginfo/metadata.rs +++ b/compiler/rustc_codegen_llvm/src/debuginfo/metadata.rs @@ -216,6 +216,8 @@ fn build_pointer_or_reference_di_node<'ll, 'tcx>( // need to make sure that we don't break existing debuginfo consumers // by doing that (at least not without a warning period). let layout_type = if ptr_type.is_box() { + // The assertion at the start of this function ensures we have a ZST allocator. + // We'll make debuginfo "skip" all ZST allocators, not just the default allocator. Ty::new_mut_ptr(cx.tcx, pointee_type) } else { ptr_type |
