File tree Expand file tree Collapse file tree 2 files changed +11
-2
lines changed Expand file tree Collapse file tree 2 files changed +11
-2
lines changed Original file line number Diff line number Diff line change 1
1
---
2
- refs/heads/master: e0eccaddb2bad87993505fffc523a47b68018e64
2
+ refs/heads/master: 94e5ca4df862b1ff3e1fdc1c02828813050845d6
Original file line number Diff line number Diff line change @@ -120,7 +120,7 @@ fn gen_ty(@type_store tystore, &sty st) -> t {
120
120
}
121
121
122
122
fn gen_ty_full ( @type_store tystore , & sty st, option. t[ str] cname ) -> t {
123
- auto h = hash_type_structure ( st) ;
123
+ auto h = hash_type_info ( st, cname ) ;
124
124
auto new_type = @rec ( struct=st, cname=cname, hash=h) ;
125
125
126
126
// Is it interned?
@@ -888,6 +888,15 @@ fn hash_type_structure(&sty st) -> uint {
888
888
}
889
889
}
890
890
891
+ fn hash_type_info( & sty st, option. t[ str ] cname_opt) -> uint {
892
+ auto h = hash_type_structure( st) ;
893
+ alt ( cname_opt) {
894
+ case ( none[ str ] ) { /* no-op */ }
895
+ case ( some[ str ] ( ?s) ) { h += h << 5 u + _str. hash( s) ; }
896
+ }
897
+ ret h;
898
+ }
899
+
891
900
fn hash_ty( & t typ) -> uint { ret typ. hash; }
892
901
893
902
You can’t perform that action at this time.
0 commit comments