@@ -447,7 +447,7 @@ struct Module {
447
447
import_resolutions : @mut HashMap < Name , @mut ImportResolution > ,
448
448
449
449
// The number of unresolved globs that this module exports.
450
- glob_count : uint ,
450
+ glob_count : Cell < uint > ,
451
451
452
452
// The index of the import we're resolving.
453
453
resolved_import_count : uint ,
@@ -475,7 +475,7 @@ impl Module {
475
475
external_module_children : @mut HashMap :: new ( ) ,
476
476
anonymous_children : @mut HashMap :: new ( ) ,
477
477
import_resolutions : @mut HashMap :: new ( ) ,
478
- glob_count : 0 ,
478
+ glob_count : Cell :: new ( 0 ) ,
479
479
resolved_import_count : 0 ,
480
480
populated : Cell :: new ( !external) ,
481
481
}
@@ -1961,7 +1961,7 @@ impl Resolver {
1961
1961
// Set the glob flag. This tells us that we don't know the
1962
1962
// module's exports ahead of time.
1963
1963
1964
- module_. glob_count += 1 ;
1964
+ module_. glob_count . set ( module_ . glob_count . get ( ) + 1 ) ;
1965
1965
}
1966
1966
}
1967
1967
@@ -2192,8 +2192,8 @@ impl Resolver {
2192
2192
if !resolution_result. indeterminate ( ) {
2193
2193
match * import_directive. subclass {
2194
2194
GlobImport => {
2195
- assert ! ( module_. glob_count >= 1 ) ;
2196
- module_. glob_count -= 1 ;
2195
+ assert ! ( module_. glob_count. get ( ) >= 1 ) ;
2196
+ module_. glob_count . set ( module_ . glob_count . get ( ) - 1 ) ;
2197
2197
}
2198
2198
SingleImport ( ..) => {
2199
2199
// Ignore.
@@ -2268,7 +2268,7 @@ impl Resolver {
2268
2268
// containing module, bail out. We don't know enough to be
2269
2269
// able to resolve this import.
2270
2270
2271
- if containing_module. glob_count > 0 {
2271
+ if containing_module. glob_count . get ( ) > 0 {
2272
2272
debug ! ( "(resolving single import) unresolved glob; \
2273
2273
bailing out") ;
2274
2274
return Indeterminate ;
@@ -2463,7 +2463,7 @@ impl Resolver {
2463
2463
return Indeterminate ;
2464
2464
}
2465
2465
2466
- assert_eq ! ( containing_module. glob_count, 0 ) ;
2466
+ assert_eq ! ( containing_module. glob_count. get ( ) , 0 ) ;
2467
2467
2468
2468
// Add all resolved imports from the containing module.
2469
2469
for ( ident, target_import_resolution) in containing_module. import_resolutions . iter ( ) {
@@ -3102,7 +3102,7 @@ impl Resolver {
3102
3102
// If this is a search of all imports, we should be done with glob
3103
3103
// resolution at this point.
3104
3104
if name_search_type == PathSearch {
3105
- assert_eq ! ( module_. glob_count, 0 ) ;
3105
+ assert_eq ! ( module_. glob_count. get ( ) , 0 ) ;
3106
3106
}
3107
3107
3108
3108
// Check the list of resolved imports.
0 commit comments