detect_opaque_types_added_while_handling_opaque_types

Function detect_opaque_types_added_while_handling_opaque_types 

Source
pub(crate) fn detect_opaque_types_added_while_handling_opaque_types<'tcx>(
    infcx: &InferCtxt<'tcx>,
    opaque_types_storage_num_entries: OpaqueTypeStorageEntries,
)
Expand description

In theory apply_definition_site_hidden_types could introduce new uses of opaque types. We do not check these new uses so this could be unsound.

We detect any new uses and simply delay a bug if they occur. If this results in an ICE we can properly handle this, but we haven’t encountered any such test yet.

See the related comment in FnCtxt::detect_opaque_types_added_during_writeback.