Change:
This code creates MIR statements based on an iteration order: is defined as: Since FxHashMap's fixed seed is different between 32 and 64 bit platforms, we may end up creating statements in a different order on 32-bit vs 64-bit hosts (the target platform passed to the compiler has no effect). We should probably sort by before creating the statements.
Perhaps it should just use instead?
Revisiting this issue to evaluate the priority. unsure about the status and global direction of this issue. Do we have some work in progress somewhere? I've tried following the breadcrumbs and landed on . Unsure if it helps and - if yes - how much does that pull request covers to fix this issue. opinions? thanks :)

Discussion:
use crate::deref_separator::deref_finder; use crate::MirPass; <del> use rustc_data_structures::fx::FxHashMap; </del> use rustc_index::bit_set::BitSet; <ins> use rustc_index::IndexVec; </ins> use rustc_middle::mir::patch::MirPatch; use rustc_middle::mir::*; use rustc_middle::ty::{self, TyCtxt};

let reachable = traversal::reachable_as_bitset(body); <ins> let drop_flags = IndexVec::from_elem(None, &env.move_data.move_paths); </ins> ElaborateDropsCtxt { tcx, body, env: &env, init_data: InitializationData { inits, uninits }, <del> drop_flags: Default::default(), </del> <ins> drop_flags, </ins> patch: MirPatch::new(body), un_derefer: un_derefer, reachable,

body: &'a Body<'tcx>, env: &'a MoveDataParamEnv<'tcx>, init_data: InitializationData<'a, 'tcx>, <del> drop_flags: FxHashMap<MovePathIndex, Local>, </del> <ins> drop_flags: IndexVec<MovePathIndex, Option<Local>>, </ins> patch: MirPatch<'tcx>, un_derefer: UnDerefer<'tcx>, reachable: BitSet<BasicBlock>,

let tcx = self.tcx; let patch = &mut self.patch; debug!("create_drop_flag({:?})", self.body.span); <del> self.drop_flags.entry(index).or_insert_with(|| patch.new_internal(tcx.types.bool, span)); </del> <ins> self.drop_flags[index].get_or_insert_with(|| patch.new_internal(tcx.types.bool, span)); </ins> } fn drop_flag(&mut self, index: MovePathIndex) -> Option<Place<'tcx>> { <del> self.drop_flags.get(&index).map(|t| Place::from(*t)) </del> <ins> self.drop_flags[index].map(Place::from) </ins> } /// create a patch that elaborates all drops in the input

} fn set_drop_flag(&mut self, loc: Location, path: MovePathIndex, val: DropFlagState) { <del> if let Some(&flag) = self.drop_flags.get(&path) { </del> <ins> if let Some(flag) = self.drop_flags[path] { </ins> let span = self.patch.source_info_for_location(self.body, loc).span; let val = self.constant_bool(span, val.value()); self.patch.add_assign(loc, Place::from(flag), val);

let loc = Location::START; let span = self.patch.source_info_for_location(self.body, loc).span; let false_ = self.constant_bool(span, false); <del> for flag in self.drop_flags.values() { </del> <ins> for flag in self.drop_flags.iter().flatten() { </ins> self.patch.add_assign(loc, Place::from(*flag), false_.clone()); } }

} bb0: { <del> +         _9 = const false;                // scope 0 at $DIR/issue_41888.rs:+1:9: +1:10 </del> +         _7 = const false;                // scope 0 at $DIR/issue_41888.rs:+1:9: +1:10 +         _8 = const false;                // scope 0 at $DIR/issue_41888.rs:+1:9: +1:10 <ins> +         _9 = const false;                // scope 0 at $DIR/issue_41888.rs:+1:9: +1:10 </ins> StorageLive(_1);                 // scope 0 at $DIR/issue_41888.rs:+1:9: +1:10 StorageLive(_2);                 // scope 1 at $DIR/issue_41888.rs:+2:8: +2:14 _2 = cond() -> [return: bb1, unwind: bb11]; // scope 1 at $DIR/issue_41888.rs:+2:8: +2:14