@@ -25,12 +25,12 @@ impl<'a, 'tcx> NiceRegionError<'a, 'tcx> {
25
25
// only introduced anonymous regions in parameters) as well as a
26
26
// version new_ty of its type where the anonymous region is replaced
27
27
// 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 ( ) )
29
29
&& let Some ( region_info) = self . tcx ( ) . is_suitable_region ( self . generic_param_scope , sup)
30
30
&& let Some ( anon_param_info) = self . find_param_with_region ( sup, sub)
31
31
{
32
32
( sub, sup, anon_param_info, region_info)
33
- } else if sup. has_name ( self . tcx ( ) )
33
+ } else if sup. is_named ( self . tcx ( ) )
34
34
&& let Some ( region_info) = self . tcx ( ) . is_suitable_region ( self . generic_param_scope , sub)
35
35
&& let Some ( anon_param_info) = self . find_param_with_region ( sub, sup)
36
36
{
@@ -56,9 +56,7 @@ impl<'a, 'tcx> NiceRegionError<'a, 'tcx> {
56
56
let scope_def_id = region_info. scope ;
57
57
let is_impl_item = region_info. is_impl_item ;
58
58
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 ( ) ) {
62
60
/* not an anonymous region */
63
61
debug ! ( "try_report_named_anon_conflict: not an anonymous region" ) ;
64
62
return None ;
0 commit comments