Skip to content

Commit 4920a33

Browse files
committed
better explain GLOBAL_KIND choice
1 parent 02046a5 commit 4920a33

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

src/librustc_mir/const_eval/machine.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -178,7 +178,7 @@ impl<'mir, 'tcx> interpret::Machine<'mir, 'tcx> for CompileTimeInterpreter {
178178

179179
type MemoryMap = FxHashMap<AllocId, (MemoryKind<!>, Allocation)>;
180180

181-
const GLOBAL_KIND: Option<!> = None; // no copying of globals allowed
181+
const GLOBAL_KIND: Option<!> = None; // no copying of globals from `tcx` to machine memory
182182

183183
// We do not check for alignment to avoid having to carry an `Align`
184184
// in `ConstValue::ByRef`.

src/librustc_mir/transform/const_prop.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -172,7 +172,7 @@ impl<'mir, 'tcx> interpret::Machine<'mir, 'tcx> for ConstPropMachine {
172172

173173
type MemoryMap = FxHashMap<AllocId, (MemoryKind<!>, Allocation)>;
174174

175-
const GLOBAL_KIND: Option<!> = None;
175+
const GLOBAL_KIND: Option<!> = None; // no copying of globals from `tcx` to machine memory
176176

177177
const CHECK_ALIGN: bool = false;
178178

0 commit comments

Comments
 (0)