Skip to content

Commit b65609f

Browse files
committed
gaming
1 parent 3c7c8d3 commit b65609f

File tree

3 files changed

+6
-8
lines changed

3 files changed

+6
-8
lines changed

compiler/rustc_hir_typeck/src/opaque_types.rs

+2-6
Original file line numberDiff line numberDiff line change
@@ -48,13 +48,9 @@ impl<'a, 'tcx> FnCtxt<'a, 'tcx> {
4848
) => continue,
4949
}
5050

51+
// TODO
5152
if hidden_type.ty.has_non_region_infer() {
52-
let guar =
53-
tcx.dcx().span_err(hidden_type.span, "non-defining use in the defining scope");
54-
typeck_results
55-
.concrete_opaque_types
56-
.insert(opaque_type_key.def_id, OpaqueHiddenType::new_error(tcx, guar));
57-
self.set_tainted_by_errors(guar);
53+
continue;
5854
}
5955

6056
let hidden_type = hidden_type.remap_generic_params_to_declaration_params(

compiler/rustc_infer/src/infer/mod.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -961,7 +961,7 @@ impl<'tcx> InferCtxt<'tcx> {
961961

962962
pub fn find_sup_as_registered_opaque(&self, ty_vid: TyVid) -> Option<ty::AliasTy<'tcx>> {
963963
let ty_sub_vid = self.sub_root_var(ty_vid);
964-
let opaques = self.inner.borrow().opaque_type_storage.opaque_types.clone();
964+
let opaques: Vec<_> = self.inner.borrow().opaque_type_storage.iter_opaque_types().collect();
965965
opaques
966966
.into_iter()
967967
.find(|(_, hidden_ty)| {

compiler/rustc_next_trait_solver/src/solve/eval_ctxt/mod.rs

+3-1
Original file line numberDiff line numberDiff line change
@@ -1105,7 +1105,9 @@ where
11051105

11061106
pub(crate) fn find_sup_as_registered_opaque(&self, self_ty: I::Ty) -> Option<ty::AliasTy<I>> {
11071107
self.delegate
1108-
.clone_opaque_types_for_query_response()
1108+
.clone_opaque_types_lookup_table()
1109+
.into_iter()
1110+
.chain(self.delegate.clone_duplicate_opaque_types())
11091111
.into_iter()
11101112
.find(|(_, hidden_ty)| {
11111113
if let ty::Infer(ty::TyVar(self_vid)) = self_ty.kind() {

0 commit comments

Comments
 (0)