@@ -1299,23 +1299,23 @@ fn type_autoderef(cx: ctxt, t: ty::t) -> ty::t {
1299
1299
fn hash_type_structure ( st : sty ) -> uint {
1300
1300
fn hash_uint ( id : uint , n : uint ) -> uint {
1301
1301
let h = id;
1302
- h += h << 5 u + n;
1302
+ h += ( h << 5 u) + n;
1303
1303
ret h;
1304
1304
}
1305
1305
fn hash_def ( id : uint , did : ast:: def_id ) -> uint {
1306
1306
let h = id;
1307
- h += h << 5 u + ( did. crate as uint ) ;
1308
- h += h << 5 u + ( did. node as uint ) ;
1307
+ h += ( h << 5 u) + ( did. crate as uint ) ;
1308
+ h += ( h << 5 u) + ( did. node as uint ) ;
1309
1309
ret h;
1310
1310
}
1311
1311
fn hash_subty ( id : uint , subty : t ) -> uint {
1312
1312
let h = id;
1313
- h += h << 5 u + hash_ty ( subty) ;
1313
+ h += ( h << 5 u) + hash_ty ( subty) ;
1314
1314
ret h;
1315
1315
}
1316
1316
fn hash_type_constr ( id : uint , c : @type_constr ) -> uint {
1317
1317
let h = id;
1318
- h += h << 5 u + hash_def ( h, c. node . id ) ;
1318
+ h += ( h << 5 u) + hash_def ( h, c. node . id ) ;
1319
1319
ret hash_type_constr_args ( h, c. node . args ) ;
1320
1320
}
1321
1321
fn hash_type_constr_args ( id : uint , args : [ @ty_constr_arg ] ) -> uint {
@@ -1338,8 +1338,8 @@ fn hash_type_structure(st: sty) -> uint {
1338
1338
1339
1339
fn hash_fn ( id : uint , args : [ arg ] , rty : t ) -> uint {
1340
1340
let h = id;
1341
- for a: arg in args { h += h << 5 u + hash_ty ( a. ty ) ; }
1342
- h += h << 5 u + hash_ty ( rty) ;
1341
+ for a: arg in args { h += ( h << 5 u) + hash_ty ( a. ty ) ; }
1342
+ h += ( h << 5 u) + hash_ty ( rty) ;
1343
1343
ret h;
1344
1344
}
1345
1345
alt st {
@@ -1366,19 +1366,19 @@ fn hash_type_structure(st: sty) -> uint {
1366
1366
ty_str. { ret 17 u; }
1367
1367
ty_tag ( did, tys) {
1368
1368
let h = hash_def ( 18 u, did) ;
1369
- for typ: t in tys { h += h << 5 u + hash_ty ( typ) ; }
1369
+ for typ: t in tys { h += ( h << 5 u) + hash_ty ( typ) ; }
1370
1370
ret h;
1371
1371
}
1372
1372
ty_box ( mt) { ret hash_subty ( 19 u, mt. ty ) ; }
1373
1373
ty_vec ( mt) { ret hash_subty ( 21 u, mt. ty ) ; }
1374
1374
ty_rec ( fields) {
1375
1375
let h = 26 u;
1376
- for f: field in fields { h += h << 5 u + hash_ty ( f. mt . ty ) ; }
1376
+ for f: field in fields { h += ( h << 5 u) + hash_ty ( f. mt . ty ) ; }
1377
1377
ret h;
1378
1378
}
1379
1379
ty_tup ( ts) {
1380
1380
let h = 25 u;
1381
- for tt in ts { h += h << 5 u + hash_ty ( tt) ; }
1381
+ for tt in ts { h += ( h << 5 u) + hash_ty ( tt) ; }
1382
1382
ret h;
1383
1383
}
1384
1384
@@ -1389,7 +1389,7 @@ fn hash_type_structure(st: sty) -> uint {
1389
1389
ty_native_fn ( args, rty) { ret hash_fn ( 28 u, args, rty) ; }
1390
1390
ty_obj ( methods) {
1391
1391
let h = 29 u;
1392
- for m: method in methods { h += h << 5 u + str:: hash ( m. ident ) ; }
1392
+ for m: method in methods { h += ( h << 5 u) + str:: hash ( m. ident ) ; }
1393
1393
ret h;
1394
1394
}
1395
1395
ty_var ( v) { ret hash_uint ( 30 u, v as uint ) ; }
@@ -1400,23 +1400,23 @@ fn hash_type_structure(st: sty) -> uint {
1400
1400
ty_ptr ( mt) { ret hash_subty ( 35 u, mt. ty ) ; }
1401
1401
ty_res ( did, sub, tps) {
1402
1402
let h = hash_subty ( hash_def ( 18 u, did) , sub) ;
1403
- for tp: t in tps { h += h << 5 u + hash_ty ( tp) ; }
1403
+ for tp: t in tps { h += ( h << 5 u) + hash_ty ( tp) ; }
1404
1404
ret h;
1405
1405
}
1406
1406
ty_constr ( t, cs) {
1407
1407
let h = 36 u;
1408
- for c: @type_constr in cs { h += h << 5 u + hash_type_constr ( h, c) ; }
1408
+ for c: @type_constr in cs { h += ( h << 5 u) + hash_type_constr ( h, c) ; }
1409
1409
ret h;
1410
1410
}
1411
- ty_uniq ( mt) { let h = 37 u; h += h << 5 u + hash_ty ( mt. ty ) ; ret h; }
1411
+ ty_uniq ( mt) { let h = 37 u; h += ( h << 5 u) + hash_ty ( mt. ty ) ; ret h; }
1412
1412
}
1413
1413
}
1414
1414
1415
1415
fn hash_type_info ( st : sty , cname_opt : option:: t < str > ) -> uint {
1416
1416
let h = hash_type_structure ( st) ;
1417
1417
alt cname_opt {
1418
1418
none. { /* no-op */ }
1419
- some( s) { h += h << 5 u + str:: hash ( s) ; }
1419
+ some( s) { h += ( h << 5 u) + str:: hash ( s) ; }
1420
1420
}
1421
1421
ret h;
1422
1422
}
0 commit comments