Get rid of ExposedByModule::remove for now

This commit is contained in:
Ayaz Hafiz 2022-06-22 13:39:22 -04:00
parent 16e64263f6
commit b377155acd
No known key found for this signature in database
GPG key ID: 0E2A37416A25EF58

View file

@ -484,12 +484,13 @@ fn start_phase<'a>(
abilities_store,
} = found_specializations;
// Safety: by this point every module should have been solved, so there is no need
// for our exposed types anymore, but the world does need them.
let our_exposed_types = unsafe { state.exposed_types.remove(&module_id) }
let our_exposed_types = state
.exposed_types
.get(&module_id)
.unwrap_or_else(|| {
internal_error!("Exposed types for {:?} missing", module_id)
});
})
.clone();
// Add our abilities to the world.
state.world_abilities.insert(