Skip to content

Commit aabbf45

Browse files
committed
---
yaml --- r: 94702 b: refs/heads/try c: c10d717 h: refs/heads/master v: v3
1 parent f6d7974 commit aabbf45

File tree

2 files changed

+7
-7
lines changed

2 files changed

+7
-7
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
refs/heads/master: 0da105a8b7b6b1e0568e8ff20f6ff4b13cc7ecc2
33
refs/heads/snap-stage1: e33de59e47c5076a89eadeb38f4934f58a3618a6
44
refs/heads/snap-stage3: a6d3e57dca68fde4effdda3e4ae2887aa535fcd6
5-
refs/heads/try: 5fe84118a66c0f37bc8bcb3e3a0b8a235440a5ad
5+
refs/heads/try: c10d7177db81bd207705a92f6453f82ab11521a7
66
refs/tags/release-0.1: 1f5c5126e96c79d22cb7862f75304136e204f105
77
refs/heads/ndm: f3868061cd7988080c30d6d5bf352a5a5fe2460b
88
refs/heads/try2: 147ecfdd8221e4a4d4e090486829a06da1e0ca3c

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

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -358,7 +358,7 @@ struct ImportResolution {
358358
value_target: RefCell<Option<Target>>,
359359
/// The source node of the `use` directive leading to the value target
360360
/// being non-none
361-
value_id: NodeId,
361+
value_id: Cell<NodeId>,
362362

363363
/// The type that this `use` directive names, if there is one.
364364
type_target: Option<Target>,
@@ -371,7 +371,7 @@ impl ImportResolution {
371371
fn new(id: NodeId, is_public: bool) -> ImportResolution {
372372
ImportResolution {
373373
type_id: id,
374-
value_id: id,
374+
value_id: Cell::new(id),
375375
outstanding_references: Cell::new(0),
376376
value_target: RefCell::new(None),
377377
type_target: None,
@@ -390,7 +390,7 @@ impl ImportResolution {
390390
fn id(&self, namespace: Namespace) -> NodeId {
391391
match namespace {
392392
TypeNS => self.type_id,
393-
ValueNS => self.value_id,
393+
ValueNS => self.value_id.get(),
394394
}
395395
}
396396
}
@@ -1974,7 +1974,7 @@ impl Resolver {
19741974

19751975
// the source of this name is different now
19761976
resolution.type_id = id;
1977-
resolution.value_id = id;
1977+
resolution.value_id.set(id);
19781978
}
19791979
None => {
19801980
debug!("(building import directive) creating new");
@@ -2421,7 +2421,7 @@ impl Resolver {
24212421
debug!("(resolving single import) found value target");
24222422
import_resolution.value_target.set(
24232423
Some(Target::new(target_module, name_bindings)));
2424-
import_resolution.value_id = directive.id;
2424+
import_resolution.value_id.set(directive.id);
24252425
used_public = name_bindings.defined_in_public_namespace(ValueNS);
24262426
}
24272427
UnboundResult => { /* Continue. */ }
@@ -2598,7 +2598,7 @@ impl Resolver {
25982598
debug!("(resolving glob import) ... for value target");
25992599
dest_import_resolution.value_target.set(
26002600
Some(Target::new(containing_module, name_bindings)));
2601-
dest_import_resolution.value_id = id;
2601+
dest_import_resolution.value_id.set(id);
26022602
}
26032603
if name_bindings.defined_in_public_namespace(TypeNS) {
26042604
debug!("(resolving glob import) ... for type target");

0 commit comments

Comments
 (0)