From b442b9c27a8c7225ca84ebcfcd0c59ec4ace351f Mon Sep 17 00:00:00 2001 From: Richard Feldman Date: Mon, 10 Aug 2020 23:01:17 -0400 Subject: [PATCH] Don't change env.home in specialize_all --- compiler/mono/src/ir.rs | 5 ----- 1 file changed, 5 deletions(-) diff --git a/compiler/mono/src/ir.rs b/compiler/mono/src/ir.rs index 7bcb1a7cff..fa7e6cb453 100644 --- a/compiler/mono/src/ir.rs +++ b/compiler/mono/src/ir.rs @@ -933,11 +933,6 @@ pub fn specialize_all<'a>( procs.pending_specializations = None; for (name, mut by_layout) in pending_specializations.drain() { - // Use the function's symbol's home module as the home module - // when doing canonicalization. This will be important to determine - // whether or not it's safe to defer specialization. - env.home = name.module_id(); - for (layout, pending) in by_layout.drain() { // If we've already seen this (Symbol, Layout) combination before, // don't try to specialize it again. If we do, we'll loop forever!