about summary refs log tree commit diff
path: root/compiler/rustc_middle/src
diff options
context:
space:
mode:
authorRalf Jung <post@ralfj.de>2024-08-31 11:29:02 +0200
committerRalf Jung <post@ralfj.de>2024-08-31 11:29:02 +0200
commitd0aedfbb900309bb633b3ba04bf008183cfdd9a7 (patch)
treebd27610dc20d985b99393191d4a0369390b625e8 /compiler/rustc_middle/src
parentfa72f0763de6bc1596208fc1419883ce5aea0de4 (diff)
downloadrust-d0aedfbb900309bb633b3ba04bf008183cfdd9a7.tar.gz
rust-d0aedfbb900309bb633b3ba04bf008183cfdd9a7.zip
interpret, codegen: tweak some comments and checks regarding Box with custom allocator
Diffstat (limited to 'compiler/rustc_middle/src')
-rw-r--r--compiler/rustc_middle/src/ty/sty.rs5
1 files changed, 4 insertions, 1 deletions
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() {