Skip to content

Commit 47d650e

Browse files
committed
rustc: Box the tuples returned by hashmap.items() for now since we don't have alias iterators yet
1 parent ebee493 commit 47d650e

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

src/comp/middle/trans.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5698,7 +5698,7 @@ fn find_main_fn(@crate_ctxt cx) -> ValueRef {
56985698
auto e = sep() + "main";
56995699
let ValueRef v = C_nil();
57005700
let uint n = 0u;
5701-
for each (tup(str,ValueRef) i in cx.item_names.items()) {
5701+
for each (@tup(str,ValueRef) i in cx.item_names.items()) {
57025702
if (_str.ends_with(i._0, e)) {
57035703
n += 1u;
57045704
v = i._1;

src/lib/map.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ abs state type hashmap[K, V] = state obj {
1414
fn find(&K key) -> option.t[V];
1515
fn remove(&K key) -> option.t[V];
1616
fn rehash();
17-
iter items() -> tup(K,V);
17+
iter items() -> @tup(K,V);
1818
};
1919

2020
fn mk_hashmap[K, V](&hashfn[K] hasher, &eqfn[K] eqer) -> hashmap[K, V] {
@@ -216,11 +216,11 @@ fn mk_hashmap[K, V](&hashfn[K] hasher, &eqfn[K] eqer) -> hashmap[K, V] {
216216
bkts = newbkts;
217217
}
218218

219-
iter items() -> tup(K,V) {
219+
iter items() -> @tup(K,V) {
220220
for (bucket[K,V] b in bkts) {
221221
alt (b) {
222222
case(some[K,V](?k,?v)) {
223-
put tup(k,v);
223+
put @tup(k,v);
224224
}
225225
case (_) { }
226226
}

0 commit comments

Comments
 (0)