Skip to content

Commit

Permalink
better explain GLOBAL_KIND choice
Browse files Browse the repository at this point in the history
  • Loading branch information
RalfJung committed Mar 25, 2020
1 parent 02046a5 commit 4920a33
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/librustc_mir/const_eval/machine.rs
Expand Up @@ -178,7 +178,7 @@ impl<'mir, 'tcx> interpret::Machine<'mir, 'tcx> for CompileTimeInterpreter {

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

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

// We do not check for alignment to avoid having to carry an `Align`
// in `ConstValue::ByRef`.
Expand Down
2 changes: 1 addition & 1 deletion src/librustc_mir/transform/const_prop.rs
Expand Up @@ -172,7 +172,7 @@ impl<'mir, 'tcx> interpret::Machine<'mir, 'tcx> for ConstPropMachine {

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

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

const CHECK_ALIGN: bool = false;

Expand Down

0 comments on commit 4920a33

Please sign in to comment.