@@ -61,10 +61,12 @@ impl<'ra, 'tcx> Resolver<'ra, 'tcx> {
6161        ident :  Ident , 
6262        ns :  Namespace , 
6363        res :  Res , 
64-         vis :  Visibility < impl   Into < DefId > > , 
64+         vis :  Visibility , 
6565        span :  Span , 
6666        expn_id :  LocalExpnId , 
6767    )  { 
68+         assert ! ( parent. is_local( ) ) ; 
69+         assert ! ( res. opt_def_id( ) . is_none_or( |def_id| def_id. is_local( ) ) ) ; 
6870        let  binding = self . arenas . new_res_binding ( res,  vis. to_def_id ( ) ,  span,  expn_id) ; 
6971        self . define_binding_local ( parent,  ident,  ns,  binding) 
7072    } 
@@ -76,18 +78,18 @@ impl<'ra, 'tcx> Resolver<'ra, 'tcx> {
7678        ident :  Ident , 
7779        ns :  Namespace , 
7880        res :  Res , 
79-         vis :  Visibility < impl   Into < DefId > > , 
81+         vis :  Visibility < DefId > , 
8082        span :  Span , 
8183        expn_id :  LocalExpnId , 
8284    )  { 
83-         let  binding = self . arenas . new_res_binding ( res,  vis. to_def_id ( ) ,  span,  expn_id) ; 
85+         assert ! ( !parent. is_local( ) ) ; 
86+         assert ! ( !res. opt_def_id( ) . is_some_and( |def_id| def_id. is_local( ) ) ,  "res: {res:?} is local" ) ; 
87+         let  binding = self . arenas . new_res_binding ( res,  vis,  span,  expn_id) ; 
8488        let  key = self . new_disambiguated_key ( ident,  ns) ; 
85-         self . check_reserved_macro_name ( key. ident ,  binding. res ( ) ) ; 
8689        let  resolution = & mut  * self . resolution ( parent,  key) . borrow_mut ( ) ; 
8790        if  resolution. binding . is_some ( )  { 
8891            panic ! ( "An external binding was already defined" ) ; 
8992        } 
90-         // FIXME: maybe some handling of glob-importers 
9193        resolution. binding  = Some ( binding) ; 
9294    } 
9395
0 commit comments