diff options
| author | Marijn Haverbeke <marijnh@gmail.com> | 2011-10-06 12:26:12 +0200 |
|---|---|---|
| committer | Marijn Haverbeke <marijnh@gmail.com> | 2011-10-07 09:09:50 +0200 |
| commit | f9fbd86f52cf597b85359ade1ca60b8d6ebf7286 (patch) | |
| tree | d6f0cdd039642052f3ccb4ba8f3b9821bb7cbaaf /src/lib/map.rs | |
| parent | 4709038d641ad009b44ed2bf5980fa3a252d6927 (diff) | |
Parse and typecheck by-value and by-ref arg specs
Add sprinkle && throughout the compiler to make it typecheck again. Issue #1008
Diffstat (limited to 'src/lib/map.rs')
| -rw-r--r-- | src/lib/map.rs | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/lib/map.rs b/src/lib/map.rs index 81be20a6620..c63183b1893 100644 --- a/src/lib/map.rs +++ b/src/lib/map.rs @@ -199,14 +199,14 @@ fn new_str_hash<@V>() -> hashmap<str, V> { } fn new_int_hash<@V>() -> hashmap<int, V> { - fn hash_int(x: int) -> uint { ret x as uint; } - fn eq_int(a: int, b: int) -> bool { ret a == b; } + fn hash_int(&&x: int) -> uint { ret x as uint; } + fn eq_int(&&a: int, &&b: int) -> bool { ret a == b; } ret mk_hashmap(hash_int, eq_int); } fn new_uint_hash<@V>() -> hashmap<uint, V> { - fn hash_uint(x: uint) -> uint { ret x; } - fn eq_uint(a: uint, b: uint) -> bool { ret a == b; } + fn hash_uint(&&x: uint) -> uint { ret x; } + fn eq_uint(&&a: uint, &&b: uint) -> bool { ret a == b; } ret mk_hashmap(hash_uint, eq_uint); } |
