Skip to content

Commit 33b2c1a

Browse files
committed
---
yaml --- r: 147552 b: refs/heads/try2 c: 01d8380 h: refs/heads/master v: v3
1 parent 10f90f9 commit 33b2c1a

File tree

2 files changed

+9
-9
lines changed

2 files changed

+9
-9
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ refs/heads/snap-stage3: 78a7676898d9f80ab540c6df5d4c9ce35bb50463
55
refs/heads/try: 519addf6277dbafccbb4159db4b710c37eaa2ec5
66
refs/tags/release-0.1: 1f5c5126e96c79d22cb7862f75304136e204f105
77
refs/heads/ndm: f3868061cd7988080c30d6d5bf352a5a5fe2460b
8-
refs/heads/try2: 6db9a8c55cc45afb5b28f67352f32507188094f5
8+
refs/heads/try2: 01d8380b19f63f1a8acafcc340c7e964b55fda82
99
refs/heads/dist-snap: ba4081a5a8573875fed17545846f6f6902c8ba8d
1010
refs/tags/release-0.2: c870d2dffb391e14efb05aa27898f1f6333a9596
1111
refs/tags/release-0.3: b5f0d0f648d9a6153664837026ba1be43d3e2503

branches/try2/src/librustc/middle/resolve.rs

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -447,7 +447,7 @@ struct Module {
447447
import_resolutions: @mut HashMap<Name, @mut ImportResolution>,
448448

449449
// The number of unresolved globs that this module exports.
450-
glob_count: uint,
450+
glob_count: Cell<uint>,
451451

452452
// The index of the import we're resolving.
453453
resolved_import_count: uint,
@@ -475,7 +475,7 @@ impl Module {
475475
external_module_children: @mut HashMap::new(),
476476
anonymous_children: @mut HashMap::new(),
477477
import_resolutions: @mut HashMap::new(),
478-
glob_count: 0,
478+
glob_count: Cell::new(0),
479479
resolved_import_count: 0,
480480
populated: Cell::new(!external),
481481
}
@@ -1961,7 +1961,7 @@ impl Resolver {
19611961
// Set the glob flag. This tells us that we don't know the
19621962
// module's exports ahead of time.
19631963

1964-
module_.glob_count += 1;
1964+
module_.glob_count.set(module_.glob_count.get() + 1);
19651965
}
19661966
}
19671967

@@ -2192,8 +2192,8 @@ impl Resolver {
21922192
if !resolution_result.indeterminate() {
21932193
match *import_directive.subclass {
21942194
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);
21972197
}
21982198
SingleImport(..) => {
21992199
// Ignore.
@@ -2268,7 +2268,7 @@ impl Resolver {
22682268
// containing module, bail out. We don't know enough to be
22692269
// able to resolve this import.
22702270

2271-
if containing_module.glob_count > 0 {
2271+
if containing_module.glob_count.get() > 0 {
22722272
debug!("(resolving single import) unresolved glob; \
22732273
bailing out");
22742274
return Indeterminate;
@@ -2463,7 +2463,7 @@ impl Resolver {
24632463
return Indeterminate;
24642464
}
24652465

2466-
assert_eq!(containing_module.glob_count, 0);
2466+
assert_eq!(containing_module.glob_count.get(), 0);
24672467

24682468
// Add all resolved imports from the containing module.
24692469
for (ident, target_import_resolution) in containing_module.import_resolutions.iter() {
@@ -3102,7 +3102,7 @@ impl Resolver {
31023102
// If this is a search of all imports, we should be done with glob
31033103
// resolution at this point.
31043104
if name_search_type == PathSearch {
3105-
assert_eq!(module_.glob_count, 0);
3105+
assert_eq!(module_.glob_count.get(), 0);
31063106
}
31073107

31083108
// Check the list of resolved imports.

0 commit comments

Comments
 (0)