@@ -641,8 +641,7 @@ impl<'a: 'ast, 'ast> Visitor<'ast> for LateResolutionVisitor<'a, '_, 'ast> {
641641                // Check whether we should interpret this as a bare trait object. 
642642                if  qself. is_none ( ) 
643643                    && let  Some ( partial_res)  = self . r . partial_res_map . get ( & ty. id ) 
644-                     && partial_res. unresolved_segments ( )  == 0 
645-                     && let  Res :: Def ( DefKind :: Trait  | DefKind :: TraitAlias ,  _)  = partial_res. base_res ( ) 
644+                     && let  Some ( Res :: Def ( DefKind :: Trait  | DefKind :: TraitAlias ,  _) )  = partial_res. full_res ( ) 
646645                { 
647646                    // This path is actually a bare trait object.  In case of a bare `Fn`-trait 
648647                    // object with anonymous lifetimes, we need this rib to correctly place the 
@@ -1929,7 +1928,7 @@ impl<'a: 'ast, 'b, 'ast> LateResolutionVisitor<'a, 'b, 'ast> {
19291928                match  ty. kind  { 
19301929                    TyKind :: ImplicitSelf  => true , 
19311930                    TyKind :: Path ( None ,  _)  => { 
1932-                         let  path_res = self . r . partial_res_map [ & ty. id ] . base_res ( ) ; 
1931+                         let  path_res = self . r . partial_res_map [ & ty. id ] . expect_full_res ( ) ; 
19331932                        if  let  Res :: SelfTyParam  {  .. }  | Res :: SelfTyAlias  {  .. }  = path_res { 
19341933                            return  true ; 
19351934                        } 
@@ -1970,7 +1969,7 @@ impl<'a: 'ast, 'b, 'ast> LateResolutionVisitor<'a, 'b, 'ast> {
19701969                    None 
19711970                } 
19721971            } ) 
1973-             . map ( |res| res. base_res ( ) ) 
1972+             . map ( |res| res. expect_full_res ( ) ) 
19741973            . filter ( |res| { 
19751974                // Permit the types that unambiguously always 
19761975                // result in the same type constructor being used 
@@ -2530,7 +2529,7 @@ impl<'a: 'ast, 'b, 'ast> LateResolutionVisitor<'a, 'b, 'ast> {
25302529                Finalize :: new ( trait_ref. ref_id ,  trait_ref. path . span ) , 
25312530            ) ; 
25322531            self . diagnostic_metadata . currently_processing_impl_trait  = None ; 
2533-             if  let  Some ( def_id)  = res. base_res ( ) . opt_def_id ( )  { 
2532+             if  let  Some ( def_id)  = res. expect_full_res ( ) . opt_def_id ( )  { 
25342533                new_id = Some ( def_id) ; 
25352534                new_val = Some ( ( self . r . expect_module ( def_id) ,  trait_ref. clone ( ) ) ) ; 
25362535            } 
@@ -2886,7 +2885,10 @@ impl<'a: 'ast, 'b, 'ast> LateResolutionVisitor<'a, 'b, 'ast> {
28862885    } 
28872886
28882887    fn  is_base_res_local ( & self ,  nid :  NodeId )  -> bool  { 
2889-         matches ! ( self . r. partial_res_map. get( & nid) . map( |res| res. base_res( ) ) ,  Some ( Res :: Local ( ..) ) ) 
2888+         matches ! ( 
2889+             self . r. partial_res_map. get( & nid) . map( |res| res. expect_full_res( ) ) , 
2890+             Some ( Res :: Local ( ..) ) 
2891+         ) 
28902892    } 
28912893
28922894    /// Checks that all of the arms in an or-pattern have exactly the 
@@ -3373,12 +3375,11 @@ impl<'a: 'ast, 'b, 'ast> LateResolutionVisitor<'a, 'b, 'ast> {
33733375            source. defer_to_typeck ( ) , 
33743376            finalize, 
33753377        )  { 
3376-             Ok ( Some ( partial_res) )  if  partial_res. unresolved_segments ( )  == 0  => { 
3377-                 if  source. is_expected ( partial_res. base_res ( ) )  || partial_res. base_res ( )  == Res :: Err 
3378-                 { 
3378+             Ok ( Some ( partial_res) )  if  let  Some ( res)  = partial_res. full_res ( )  => { 
3379+                 if  source. is_expected ( res)  || res == Res :: Err  { 
33793380                    partial_res
33803381                }  else  { 
3381-                     report_errors ( self ,  Some ( partial_res . base_res ( ) ) ) 
3382+                     report_errors ( self ,  Some ( res ) ) 
33823383                } 
33833384            } 
33843385
@@ -3586,20 +3587,21 @@ impl<'a: 'ast, 'b, 'ast> LateResolutionVisitor<'a, 'b, 'ast> {
35863587        } ; 
35873588
35883589        if  path. len ( )  > 1 
3589-             && result. base_res ( )  != Res :: Err 
3590+             && let  Some ( res)  = result. full_res ( ) 
3591+             && res != Res :: Err 
35903592            && path[ 0 ] . ident . name  != kw:: PathRoot 
35913593            && path[ 0 ] . ident . name  != kw:: DollarCrate 
35923594        { 
35933595            let  unqualified_result = { 
35943596                match  self . resolve_path ( & [ * path. last ( ) . unwrap ( ) ] ,  Some ( ns) ,  None )  { 
3595-                     PathResult :: NonModule ( path_res)  => path_res. base_res ( ) , 
3597+                     PathResult :: NonModule ( path_res)  => path_res. expect_full_res ( ) , 
35963598                    PathResult :: Module ( ModuleOrUniformRoot :: Module ( module) )  => { 
35973599                        module. res ( ) . unwrap ( ) 
35983600                    } 
35993601                    _ => return  Ok ( Some ( result) ) , 
36003602                } 
36013603            } ; 
3602-             if  result . base_res ( )  == unqualified_result { 
3604+             if  res  == unqualified_result { 
36033605                let  lint = lint:: builtin:: UNUSED_QUALIFICATIONS ; 
36043606                self . r . lint_buffer . buffer_lint ( 
36053607                    lint, 
0 commit comments