File tree Expand file tree Collapse file tree 2 files changed +7
-1
lines changed Expand file tree Collapse file tree 2 files changed +7
-1
lines changed Original file line number Diff line number Diff line change @@ -869,6 +869,10 @@ fn for_each_late_bound_region_in_item<'tcx>(
869869 mir_def_id : LocalDefId ,
870870 mut f : impl FnMut ( ty:: Region < ' tcx > ) ,
871871) {
872+ if !tcx. def_kind ( mir_def_id) . is_fn_like ( ) {
873+ return ;
874+ }
875+
872876 for bound_var in tcx. late_bound_vars ( tcx. hir ( ) . local_def_id_to_hir_id ( mir_def_id) ) {
873877 let ty:: BoundVariableKind :: Region ( bound_region) = bound_var else { continue ; } ;
874878 let liberated_region = tcx
Original file line number Diff line number Diff line change @@ -2895,7 +2895,9 @@ impl<'tcx> TyCtxt<'tcx> {
28952895 self . mk_bound_variable_kinds (
28962896 self . late_bound_vars_map ( id. owner )
28972897 . and_then ( |map| map. get ( & id. local_id ) . cloned ( ) )
2898- . unwrap_or_default ( )
2898+ . unwrap_or_else ( || {
2899+ bug ! ( "No bound vars found for {:?} ({:?})" , self . hir( ) . node_to_string( id) , id)
2900+ } )
28992901 . iter ( ) ,
29002902 )
29012903 }
You can’t perform that action at this time.
0 commit comments