File tree Expand file tree Collapse file tree 1 file changed +2
-8
lines changed
compiler/rustc_borrowck/src/region_infer/opaque_types Expand file tree Collapse file tree 1 file changed +2
-8
lines changed Original file line number Diff line number Diff line change @@ -155,13 +155,6 @@ fn add_hidden_type<'tcx>(
155155 }
156156}
157157
158- fn get_hidden_type < ' tcx > (
159- hidden_types : & DefinitionSiteHiddenTypes < ' tcx > ,
160- def_id : LocalDefId ,
161- ) -> Option < EarlyBinder < ' tcx , OpaqueHiddenType < ' tcx > > > {
162- hidden_types. 0 . get ( & def_id) . map ( |ty| EarlyBinder :: bind ( * ty) )
163- }
164-
165158#[ derive( Debug ) ]
166159struct DefiningUse < ' tcx > {
167160 /// The opaque type using non NLL vars. This uses the actual
@@ -501,7 +494,8 @@ pub(crate) fn apply_definition_site_hidden_types<'tcx>(
501494 let tcx = infcx. tcx ;
502495 let mut errors = Vec :: new ( ) ;
503496 for & ( key, hidden_type) in opaque_types {
504- let Some ( expected) = get_hidden_type ( hidden_types, key. def_id ) else {
497+ let Some ( expected) = hidden_types. 0 . get ( & key. def_id ) . map ( |ty| EarlyBinder :: bind ( * ty) )
498+ else {
505499 if !tcx. use_typing_mode_borrowck ( ) {
506500 if let ty:: Alias ( ty:: Opaque , alias_ty) = hidden_type. ty . kind ( )
507501 && alias_ty. def_id == key. def_id . to_def_id ( )
You can’t perform that action at this time.
0 commit comments