fix hash function: + binds tighter than <<
This commit is contained in:
parent
66355607da
commit
8b608125ac
1 changed files with 4 additions and 1 deletions
|
|
@ -193,7 +193,10 @@ fn is_constraint_arg(e: @expr) -> bool {
|
|||
|
||||
fn eq_ty(&&a: @ty, &&b: @ty) -> bool { ret std::box::ptr_eq(a, b); }
|
||||
|
||||
fn hash_ty(&&t: @ty) -> uint { ret t.span.lo << 16u + t.span.hi; }
|
||||
fn hash_ty(&&t: @ty) -> uint {
|
||||
let res = (t.span.lo << 16u) + t.span.hi;
|
||||
ret res;
|
||||
}
|
||||
|
||||
fn hash_def_id(&&id: def_id) -> uint {
|
||||
id.crate as uint << 16u + (id.node as uint)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue