about summary refs log tree commit diff
path: root/src/librustc/middle/resolve.rs
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2013-05-10 17:56:02 -0700
committerbors <bors@rust-lang.org>2013-05-10 17:56:02 -0700
commit3e0400fb86170baff30282edcdccff73e243fd6e (patch)
treeec7cc5de5ce7c80845c77fdcbb670cd54c120783 /src/librustc/middle/resolve.rs
parentd546493096f35e68cbcd9b5d3d7654e7a9345744 (diff)
parent606bd75586419948f109de313ab37e31397ca7a3 (diff)
downloadrust-3e0400fb86170baff30282edcdccff73e243fd6e.tar.gz
rust-3e0400fb86170baff30282edcdccff73e243fd6e.zip
auto merge of #6223 : alexcrichton/rust/issue-6183, r=pcwalton
Closes #6183.

The first commit changes the compiler's method of treating a `for` loop, and all the remaining commits are just dealing with the fallout.

The biggest fallout was the `IterBytes` trait, although it's really a whole lot nicer now because all of the `iter_bytes_XX` methods are just and-ed together. Sadly there was a huge amount of stuff that's `cfg(stage0)` gated, but whoever lands the next snapshot is going to have a lot of fun deleting all this code!

Diffstat (limited to 'src/librustc/middle/resolve.rs')
-rw-r--r--src/librustc/middle/resolve.rs10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/librustc/middle/resolve.rs b/src/librustc/middle/resolve.rs
index 9802e1172af..4d04fa7f73c 100644
--- a/src/librustc/middle/resolve.rs
+++ b/src/librustc/middle/resolve.rs
@@ -2408,14 +2408,14 @@ pub impl Resolver {
         let merge_import_resolution = |ident,
                                        name_bindings: @mut NameBindings| {
             let dest_import_resolution;
-            match module_.import_resolutions.find(ident) {
+            match module_.import_resolutions.find(&ident) {
                 None => {
                     // Create a new import resolution from this child.
                     dest_import_resolution = @mut ImportResolution(privacy,
                                                                    span,
                                                                    state);
                     module_.import_resolutions.insert
-                        (*ident, dest_import_resolution);
+                        (ident, dest_import_resolution);
                 }
                 Some(&existing_import_resolution) => {
                     dest_import_resolution = existing_import_resolution;
@@ -2424,7 +2424,7 @@ pub impl Resolver {
 
             debug!("(resolving glob import) writing resolution `%s` in `%s` \
                     to `%s`, privacy=%?",
-                   *self.session.str_of(*ident),
+                   *self.session.str_of(ident),
                    self.module_to_str(containing_module),
                    self.module_to_str(module_),
                    copy dest_import_resolution.privacy);
@@ -2443,13 +2443,13 @@ pub impl Resolver {
         };
 
         // Add all children from the containing module.
-        for containing_module.children.each |ident, name_bindings| {
+        for containing_module.children.each |&ident, name_bindings| {
             merge_import_resolution(ident, *name_bindings);
         }
 
         // Add external module children from the containing module.
         for containing_module.external_module_children.each
-                |ident, module| {
+                |&ident, module| {
             let name_bindings =
                 @mut Resolver::create_name_bindings_from_module(*module);
             merge_import_resolution(ident, name_bindings);