99// except according to those terms.
1010
1111use { AmbiguityError , AmbiguityKind , AmbiguityErrorMisc } ;
12- use { CrateLint , Resolver , ResolutionError , Weak } ;
12+ use { CrateLint , Resolver , ResolutionError , Segment , Weak } ;
1313use { Module , ModuleKind , NameBinding , NameBindingKind , PathResult , ToNameBinding } ;
14- use { is_known_tool, names_to_string , resolve_error} ;
14+ use { is_known_tool, resolve_error} ;
1515use ModuleOrUniformRoot ;
1616use Namespace :: { self , * } ;
1717use build_reduced_graph:: { BuildReducedGraphVisitor , IsMacroExport } ;
@@ -946,7 +946,7 @@ impl<'a, 'cl> Resolver<'a, 'cl> {
946946 pub fn finalize_current_module_macro_resolutions ( & mut self ) {
947947 let module = self . current_module ;
948948
949- let check_consistency = |this : & mut Self , path : & [ Ident ] , span,
949+ let check_consistency = |this : & mut Self , path : & [ Segment ] , span,
950950 kind : MacroKind , initial_def, def| {
951951 if let Some ( initial_def) = initial_def {
952952 if def != initial_def && def != Def :: Err && this. ambiguity_errors . is_empty ( ) {
@@ -965,7 +965,7 @@ impl<'a, 'cl> Resolver<'a, 'cl> {
965965 // less informative error if the privacy error is reported elsewhere.
966966 if this. privacy_errors . is_empty ( ) {
967967 let msg = format ! ( "cannot determine resolution for the {} `{}`" ,
968- kind. descr( ) , names_to_string( path) ) ;
968+ kind. descr( ) , Segment :: names_to_string( path) ) ;
969969 let msg_note = "import resolution is stuck, try simplifying macro imports" ;
970970 this. session . struct_span_err ( span, & msg) . note ( msg_note) . emit ( ) ;
971971 }
@@ -1007,7 +1007,8 @@ impl<'a, 'cl> Resolver<'a, 'cl> {
10071007 initial_binding. def_ignoring_ambiguity ( )
10081008 } ) ;
10091009 let def = binding. def_ignoring_ambiguity ( ) ;
1010- check_consistency ( self , & [ ident] , ident. span , kind, initial_def, def) ;
1010+ let seg = Segment :: from_ident ( ident) ;
1011+ check_consistency ( self , & [ seg] , ident. span , kind, initial_def, def) ;
10111012 }
10121013 Err ( ..) => {
10131014 assert ! ( initial_binding. is_none( ) ) ;
0 commit comments