Skip to content

Commit da91c73

Browse files
committed
---
yaml --- r: 89036 b: refs/heads/snap-stage3 c: aa5b422 h: refs/heads/master v: v3
1 parent 166c2cf commit da91c73

File tree

2 files changed

+12
-12
lines changed

2 files changed

+12
-12
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
---
22
refs/heads/master: deeca5d586bfaa4aa60246f671a8d611d38f6248
33
refs/heads/snap-stage1: e33de59e47c5076a89eadeb38f4934f58a3618a6
4-
refs/heads/snap-stage3: de6eb2b2906cb959ce374306c28c535c5e799982
4+
refs/heads/snap-stage3: aa5b422267395fbdf2471acca2656ddc9f1993b7
55
refs/heads/try: b160761e35efcd1207112b3b782c06633cf441a8
66
refs/tags/release-0.1: 1f5c5126e96c79d22cb7862f75304136e204f105
77
refs/heads/ndm: f3868061cd7988080c30d6d5bf352a5a5fe2460b

branches/snap-stage3/src/librustc/middle/resolve.rs

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -346,7 +346,7 @@ struct ImportResolution {
346346
/// should *not* be used whenever resolution is being performed, this is
347347
/// only looked at for glob imports statements currently. Privacy testing
348348
/// occurs during a later phase of compilation.
349-
is_public: bool,
349+
is_public: Cell<bool>,
350350

351351
// The number of outstanding references to this name. When this reaches
352352
// zero, outside modules can count on the targets being correct. Before
@@ -374,7 +374,7 @@ impl ImportResolution {
374374
outstanding_references: Cell::new(0),
375375
value_target: None,
376376
type_target: None,
377-
is_public: is_public,
377+
is_public: Cell::new(is_public),
378378
}
379379
}
380380

@@ -2340,7 +2340,7 @@ impl Resolver {
23402340

23412341
// Import resolutions must be declared with "pub"
23422342
// in order to be exported.
2343-
if !import_resolution.is_public {
2343+
if !import_resolution.is_public.get() {
23442344
return UnboundResult;
23452345
}
23462346

@@ -2363,12 +2363,12 @@ impl Resolver {
23632363
if value_result.is_unknown() {
23642364
value_result = get_binding(self, *import_resolution,
23652365
ValueNS);
2366-
used_reexport = import_resolution.is_public;
2366+
used_reexport = import_resolution.is_public.get();
23672367
}
23682368
if type_result.is_unknown() {
23692369
type_result = get_binding(self, *import_resolution,
23702370
TypeNS);
2371-
used_reexport = import_resolution.is_public;
2371+
used_reexport = import_resolution.is_public.get();
23722372
}
23732373

23742374
}
@@ -2521,7 +2521,7 @@ impl Resolver {
25212521
target_import_resolution.type_target.is_none(),
25222522
self.module_to_str(module_));
25232523

2524-
if !target_import_resolution.is_public {
2524+
if !target_import_resolution.is_public.get() {
25252525
debug!("(resolving glob import) nevermind, just kidding");
25262526
continue
25272527
}
@@ -2564,7 +2564,7 @@ impl Resolver {
25642564
Some(type_target);
25652565
}
25662566
}
2567-
dest_import_resolution.is_public = is_public;
2567+
dest_import_resolution.is_public.set(is_public);
25682568
}
25692569
}
25702570
}
@@ -2605,7 +2605,7 @@ impl Resolver {
26052605
Some(Target::new(containing_module, name_bindings));
26062606
dest_import_resolution.type_id = id;
26072607
}
2608-
dest_import_resolution.is_public = is_public;
2608+
dest_import_resolution.is_public.set(is_public);
26092609
};
26102610

26112611
// Add all children from the containing module.
@@ -3182,7 +3182,7 @@ impl Resolver {
31823182
let import_resolutions = module_.import_resolutions.borrow();
31833183
match import_resolutions.get().find(&name.name) {
31843184
Some(import_resolution) => {
3185-
if import_resolution.is_public &&
3185+
if import_resolution.is_public.get() &&
31863186
import_resolution.outstanding_references.get() != 0 {
31873187
debug!("(resolving name in module) import \
31883188
unresolved; bailing out");
@@ -3374,7 +3374,7 @@ impl Resolver {
33743374
module_: @Module) {
33753375
let import_resolutions = module_.import_resolutions.borrow();
33763376
for (name, importresolution) in import_resolutions.get().iter() {
3377-
if !importresolution.is_public {
3377+
if !importresolution.is_public.get() {
33783378
continue
33793379
}
33803380
let xs = [TypeNS, ValueNS];
@@ -4744,7 +4744,7 @@ impl Resolver {
47444744
let import_resolutions = containing_module.import_resolutions
47454745
.borrow();
47464746
match import_resolutions.get().find(&name.name) {
4747-
Some(import_resolution) if import_resolution.is_public => {
4747+
Some(import_resolution) if import_resolution.is_public.get() => {
47484748
match (*import_resolution).target_for_namespace(namespace) {
47494749
Some(target) => {
47504750
match target.bindings.def_for_namespace(namespace) {

0 commit comments

Comments
 (0)