Skip to content

Commit b9f0d9b

Browse files
committed
librustc: De-@mut ImportResolution
1 parent 4b53a2c commit b9f0d9b

File tree

1 file changed

+6
-7
lines changed

1 file changed

+6
-7
lines changed

src/librustc/middle/resolve.rs

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -443,7 +443,7 @@ struct Module {
443443
anonymous_children: RefCell<HashMap<NodeId,@Module>>,
444444

445445
// The status of resolving each import in this module.
446-
import_resolutions: RefCell<HashMap<Name, @mut ImportResolution>>,
446+
import_resolutions: RefCell<HashMap<Name, @ImportResolution>>,
447447

448448
// The number of unresolved globs that this module exports.
449449
glob_count: Cell<uint>,
@@ -1978,7 +1978,7 @@ impl Resolver {
19781978
}
19791979
None => {
19801980
debug!("(building import directive) creating new");
1981-
let resolution = @mut ImportResolution::new(id, is_public);
1981+
let resolution = @ImportResolution::new(id, is_public);
19821982
resolution.outstanding_references.set(1);
19831983
import_resolutions.get().insert(target.name,
19841984
resolution);
@@ -2334,8 +2334,7 @@ impl Resolver {
23342334
== 0 => {
23352335

23362336
fn get_binding(this: &mut Resolver,
2337-
import_resolution:
2338-
@mut ImportResolution,
2337+
import_resolution: @ImportResolution,
23392338
namespace: Namespace)
23402339
-> NamespaceResult {
23412340

@@ -2534,7 +2533,7 @@ impl Resolver {
25342533
None => {
25352534
// Simple: just copy the old import resolution.
25362535
let new_import_resolution =
2537-
@mut ImportResolution::new(id, is_public);
2536+
@ImportResolution::new(id, is_public);
25382537
new_import_resolution.value_target.set(
25392538
target_import_resolution.value_target.get());
25402539
new_import_resolution.type_target.set(
@@ -2577,8 +2576,8 @@ impl Resolver {
25772576
match import_resolutions.get().find(&name) {
25782577
None => {
25792578
// Create a new import resolution from this child.
2580-
dest_import_resolution = @mut ImportResolution::new(id,
2581-
is_public);
2579+
dest_import_resolution =
2580+
@ImportResolution::new(id, is_public);
25822581
import_resolutions.get().insert(name,
25832582
dest_import_resolution);
25842583
}

0 commit comments

Comments
 (0)