File tree Expand file tree Collapse file tree 1 file changed +15
-3
lines changed
compiler/rustc_borrowck/src/region_infer Expand file tree Collapse file tree 1 file changed +15
-3
lines changed Original file line number Diff line number Diff line change @@ -145,9 +145,21 @@ pub(crate) fn handle_opaque_type_uses<'tcx>(
145
145
scc_values : & scc_values,
146
146
} ) ;
147
147
148
- hidden_type. ty =
149
- infcx. infer_opaque_definition_from_instantiation ( opaque_type_key, hidden_type) ;
150
- root_cx. add_concrete_opaque_type ( opaque_type_key. def_id , hidden_type) ;
148
+ let ty = infcx. infer_opaque_definition_from_instantiation ( opaque_type_key, hidden_type) ;
149
+
150
+ // TODO this doesn't seem to help
151
+ if !tcx. use_typing_mode_borrowck ( ) {
152
+ if let ty:: Alias ( ty:: Opaque , alias_ty) = ty. kind ( )
153
+ && alias_ty. def_id == opaque_type_key. def_id . to_def_id ( )
154
+ && alias_ty. args == opaque_type_key. args
155
+ {
156
+ continue ' entry;
157
+ }
158
+ }
159
+ root_cx. add_concrete_opaque_type (
160
+ opaque_type_key. def_id ,
161
+ OpaqueHiddenType { span : hidden_type. span , ty } ,
162
+ ) ;
151
163
}
152
164
153
165
if !unexpected_hidden_regions. is_empty ( ) {
You can’t perform that action at this time.
0 commit comments