@@ -25,12 +25,12 @@ impl<'a, 'tcx> NiceRegionError<'a, 'tcx> {
2525 // only introduced anonymous regions in parameters) as well as a
2626 // version new_ty of its type where the anonymous region is replaced
2727 // with the named one.
28- let ( named, anon, anon_param_info, region_info) = if sub. has_name ( self . tcx ( ) )
28+ let ( named, anon, anon_param_info, region_info) = if sub. is_named ( self . tcx ( ) )
2929 && let Some ( region_info) = self . tcx ( ) . is_suitable_region ( self . generic_param_scope , sup)
3030 && let Some ( anon_param_info) = self . find_param_with_region ( sup, sub)
3131 {
3232 ( sub, sup, anon_param_info, region_info)
33- } else if sup. has_name ( self . tcx ( ) )
33+ } else if sup. is_named ( self . tcx ( ) )
3434 && let Some ( region_info) = self . tcx ( ) . is_suitable_region ( self . generic_param_scope , sub)
3535 && let Some ( anon_param_info) = self . find_param_with_region ( sub, sup)
3636 {
@@ -56,9 +56,7 @@ impl<'a, 'tcx> NiceRegionError<'a, 'tcx> {
5656 let scope_def_id = region_info. scope ;
5757 let is_impl_item = region_info. is_impl_item ;
5858
59- if !anon_param_info. kind . is_named ( self . tcx ( ) ) {
60- // Anon region
61- } else {
59+ if anon_param_info. kind . is_named ( self . tcx ( ) ) {
6260 /* not an anonymous region */
6361 debug ! ( "try_report_named_anon_conflict: not an anonymous region" ) ;
6462 return None ;
0 commit comments