@@ -478,7 +478,7 @@ pub struct Module {
478
478
anonymous_children: @HashMap<node_id,@mut Module>,
479
479
480
480
// The status of resolving each import in this module.
481
- import_resolutions: @HashMap <ident,@mut ImportResolution>,
481
+ import_resolutions: @mut LinearMap <ident, @mut ImportResolution>,
482
482
483
483
// The number of unresolved globs that this module exports.
484
484
glob_count: uint,
@@ -498,7 +498,7 @@ pub fn Module(parent_link: ParentLink,
498
498
children: @mut LinearMap::new(),
499
499
imports: @mut ~[],
500
500
anonymous_children: @HashMap(),
501
- import_resolutions: @HashMap (),
501
+ import_resolutions: @mut LinearMap::new (),
502
502
glob_count: 0,
503
503
resolved_import_count: 0
504
504
}
@@ -2242,11 +2242,11 @@ pub impl Resolver {
2242
2242
// The name is an import which has been fully
2243
2243
// resolved. We can, therefore, just follow it.
2244
2244
if value_result. is_unknown ( ) {
2245
- value_result = get_binding ( import_resolution,
2245
+ value_result = get_binding ( * import_resolution,
2246
2246
ValueNS ) ;
2247
2247
}
2248
2248
if type_result. is_unknown ( ) {
2249
- type_result = get_binding ( import_resolution,
2249
+ type_result = get_binding ( * import_resolution,
2250
2250
TypeNS ) ;
2251
2251
}
2252
2252
}
@@ -2484,15 +2484,15 @@ pub impl Resolver {
2484
2484
2485
2485
// Add all resolved imports from the containing module.
2486
2486
for containing_module.import_resolutions.each
2487
- |&ident, & target_import_resolution| {
2487
+ |&( ident, target_import_resolution) | {
2488
2488
2489
2489
debug!(" ( resolving glob import) writing module resolution \
2490
2490
%? into `%s`",
2491
2491
is_none( & mut target_import_resolution. type_target) ,
2492
2492
self . module_to_str( module_) ) ;
2493
2493
2494
2494
// Here we merge two import resolutions.
2495
- match module_. import_resolutions . find ( & ident) {
2495
+ match module_. import_resolutions . find ( ident) {
2496
2496
None if target_import_resolution. privacy == Public => {
2497
2497
// Simple: just copy the old import resolution.
2498
2498
let new_import_resolution =
@@ -2505,7 +2505,7 @@ pub impl Resolver {
2505
2505
copy target_import_resolution. type_target ;
2506
2506
2507
2507
module_. import_resolutions . insert
2508
- ( ident, new_import_resolution) ;
2508
+ ( * ident, new_import_resolution) ;
2509
2509
}
2510
2510
None => { /* continue ... */ }
2511
2511
Some ( dest_import_resolution) => {
@@ -2547,7 +2547,7 @@ pub impl Resolver {
2547
2547
( * ident, dest_import_resolution) ;
2548
2548
}
2549
2549
Some ( existing_import_resolution) => {
2550
- dest_import_resolution = existing_import_resolution;
2550
+ dest_import_resolution = * existing_import_resolution;
2551
2551
}
2552
2552
}
2553
2553
@@ -3205,7 +3205,7 @@ pub impl Resolver {
3205
3205
false);
3206
3206
}
3207
3207
3208
- for module_.import_resolutions.each |ident, importresolution| {
3208
+ for module_.import_resolutions.each |&( ident, importresolution) | {
3209
3209
if importresolution.privacy != Public {
3210
3210
debug!(" ( computing exports) not reexporting private `%s`",
3211
3211
* self . session. str_of( * ident) ) ;
@@ -5308,9 +5308,9 @@ pub impl Resolver {
5308
5308
}
5309
5309
5310
5310
debug ! ( "Import resolutions:" ) ;
5311
- for module_. import_resolutions. each |& name, & import_resolution| {
5311
+ for module_. import_resolutions. each |& ( name, import_resolution) | {
5312
5312
let mut value_repr;
5313
- match ( * import_resolution) . target_for_namespace( ValueNS ) {
5313
+ match import_resolution. target_for_namespace( ValueNS ) {
5314
5314
None => { value_repr = ~""; }
5315
5315
Some ( _) => {
5316
5316
value_repr = ~" value: ?";
@@ -5319,15 +5319,15 @@ pub impl Resolver {
5319
5319
}
5320
5320
5321
5321
let mut type_repr;
5322
- match ( * import_resolution) . target_for_namespace( TypeNS ) {
5322
+ match import_resolution. target_for_namespace( TypeNS ) {
5323
5323
None => { type_repr = ~""; }
5324
5324
Some ( _) => {
5325
5325
type_repr = ~" type : ?";
5326
5326
// FIXME #4954
5327
5327
}
5328
5328
}
5329
5329
5330
- debug!( "* %s: %s%s", * self . session. str_of( name) ,
5330
+ debug ! ( "* %s:%s%s" , * self . session. str_of( * name) ,
5331
5331
value_repr, type_repr) ;
5332
5332
}
5333
5333
}
0 commit comments