@@ -937,8 +937,9 @@ impl<'ra, 'tcx> Resolver<'ra, 'tcx> {
937937 /// into the module.
938938 fn resolve_import < ' r > ( self : & mut ImportResolver < ' r , ' ra , ' tcx > , import : Import < ' ra > ) -> usize {
939939 debug ! (
940- "(resolving import for module) resolving import `{}::... ` in `{}`" ,
940+ "(resolving import for module) resolving import `{}::{} ` in `{}`" ,
941941 Segment :: names_to_string( & import. module_path) ,
942+ import_kind_to_string( & import. kind) ,
942943 module_to_string( import. parent_scope. module) . unwrap_or_else( || "???" . to_string( ) ) ,
943944 ) ;
944945 let module = if let Some ( module) = import. imported_module . get ( ) {
@@ -963,7 +964,13 @@ impl<'ra, 'tcx> Resolver<'ra, 'tcx> {
963964 ImportKind :: Single { source, target, ref bindings, type_ns_only, .. } => {
964965 ( source, target, bindings, type_ns_only)
965966 }
966- ImportKind :: Glob { .. } => {
967+ ImportKind :: Glob { is_prelude, .. } => {
968+ if is_prelude
969+ && let ModuleOrUniformRoot :: Module ( module) =
970+ import. imported_module . get ( ) . unwrap ( )
971+ {
972+ self . r . _get_mut_unchecked ( ) . prelude = Some ( module) ;
973+ }
967974 self . glob_imports . push ( import) ;
968975 return 0 ;
969976 }
0 commit comments