@@ -937,8 +937,9 @@ impl<'ra, 'tcx> Resolver<'ra, 'tcx> {
937
937
/// into the module.
938
938
fn resolve_import < ' r > ( self : & mut ImportResolver < ' r , ' ra , ' tcx > , import : Import < ' ra > ) -> usize {
939
939
debug ! (
940
- "(resolving import for module) resolving import `{}::... ` in `{}`" ,
940
+ "(resolving import for module) resolving import `{}::{} ` in `{}`" ,
941
941
Segment :: names_to_string( & import. module_path) ,
942
+ import_kind_to_string( & import. kind) ,
942
943
module_to_string( import. parent_scope. module) . unwrap_or_else( || "???" . to_string( ) ) ,
943
944
) ;
944
945
let module = if let Some ( module) = import. imported_module . get ( ) {
@@ -963,7 +964,13 @@ impl<'ra, 'tcx> Resolver<'ra, 'tcx> {
963
964
ImportKind :: Single { source, target, ref bindings, type_ns_only, .. } => {
964
965
( source, target, bindings, type_ns_only)
965
966
}
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
+ }
967
974
self . glob_imports . push ( import) ;
968
975
return 0 ;
969
976
}
0 commit comments