9
9
// except according to those terms.
10
10
11
11
use { AmbiguityError , AmbiguityKind , AmbiguityErrorMisc } ;
12
- use { CrateLint , Resolver , ResolutionError , Weak } ;
12
+ use { CrateLint , Resolver , ResolutionError , Segment , Weak } ;
13
13
use { Module , ModuleKind , NameBinding , NameBindingKind , PathResult , ToNameBinding } ;
14
- use { is_known_tool, names_to_string , resolve_error} ;
14
+ use { is_known_tool, resolve_error} ;
15
15
use ModuleOrUniformRoot ;
16
16
use Namespace :: { self , * } ;
17
17
use build_reduced_graph:: { BuildReducedGraphVisitor , IsMacroExport } ;
@@ -946,7 +946,7 @@ impl<'a, 'cl> Resolver<'a, 'cl> {
946
946
pub fn finalize_current_module_macro_resolutions ( & mut self ) {
947
947
let module = self . current_module ;
948
948
949
- let check_consistency = |this : & mut Self , path : & [ Ident ] , span,
949
+ let check_consistency = |this : & mut Self , path : & [ Segment ] , span,
950
950
kind : MacroKind , initial_def, def| {
951
951
if let Some ( initial_def) = initial_def {
952
952
if def != initial_def && def != Def :: Err && this. ambiguity_errors . is_empty ( ) {
@@ -965,7 +965,7 @@ impl<'a, 'cl> Resolver<'a, 'cl> {
965
965
// less informative error if the privacy error is reported elsewhere.
966
966
if this. privacy_errors . is_empty ( ) {
967
967
let msg = format ! ( "cannot determine resolution for the {} `{}`" ,
968
- kind. descr( ) , names_to_string( path) ) ;
968
+ kind. descr( ) , Segment :: names_to_string( path) ) ;
969
969
let msg_note = "import resolution is stuck, try simplifying macro imports" ;
970
970
this. session . struct_span_err ( span, & msg) . note ( msg_note) . emit ( ) ;
971
971
}
@@ -1007,7 +1007,8 @@ impl<'a, 'cl> Resolver<'a, 'cl> {
1007
1007
initial_binding. def_ignoring_ambiguity ( )
1008
1008
} ) ;
1009
1009
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) ;
1011
1012
}
1012
1013
Err ( ..) => {
1013
1014
assert ! ( initial_binding. is_none( ) ) ;
0 commit comments