1
Fork 0

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
This commit is contained in:
Matthias Krüger 2024-08-31 14:46:14 +02:00 committed by GitHub
commit 830b1deaee
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
4 changed files with 15 additions and 6 deletions

View file

@ -1149,7 +1149,10 @@ impl<'tcx> Ty<'tcx> {
}
}
/// Tests whether this is a Box using the global allocator.
/// Tests whether this is a Box definitely using the global allocator.
///
/// If the allocator is still generic, the answer is `false`, but it may
/// later turn out that it does use the global allocator.
#[inline]
pub fn is_box_global(self, tcx: TyCtxt<'tcx>) -> bool {
match self.kind() {