From d0aedfbb900309bb633b3ba04bf008183cfdd9a7 Mon Sep 17 00:00:00 2001 From: Ralf Jung Date: Sat, 31 Aug 2024 11:29:02 +0200 Subject: interpret, codegen: tweak some comments and checks regarding Box with custom allocator --- compiler/rustc_middle/src/ty/sty.rs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'compiler/rustc_middle/src') diff --git a/compiler/rustc_middle/src/ty/sty.rs b/compiler/rustc_middle/src/ty/sty.rs index d60bfb9faa1..8db9c93613b 100644 --- a/compiler/rustc_middle/src/ty/sty.rs +++ b/compiler/rustc_middle/src/ty/sty.rs @@ -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() { -- cgit 1.4.1-3-g733a5