Skip to content

Commit 8b60812

Browse files
committed
fix hash function: + binds tighter than <<
1 parent 6635560 commit 8b60812

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

src/comp/syntax/ast_util.rs

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -193,7 +193,10 @@ fn is_constraint_arg(e: @expr) -> bool {
193193

194194
fn eq_ty(&&a: @ty, &&b: @ty) -> bool { ret std::box::ptr_eq(a, b); }
195195

196-
fn hash_ty(&&t: @ty) -> uint { ret t.span.lo << 16u + t.span.hi; }
196+
fn hash_ty(&&t: @ty) -> uint {
197+
let res = (t.span.lo << 16u) + t.span.hi;
198+
ret res;
199+
}
197200

198201
fn hash_def_id(&&id: def_id) -> uint {
199202
id.crate as uint << 16u + (id.node as uint)

0 commit comments

Comments
 (0)