File tree Expand file tree Collapse file tree 2 files changed +8
-5
lines changed Expand file tree Collapse file tree 2 files changed +8
-5
lines changed Original file line number Diff line number Diff line change 1
1
---
2
- refs/heads/master: c7473c8260cbe6892eeed82f275bf09a73895e0e
2
+ refs/heads/master: 14d1c53a9c3570f91ede7d7ad9c8c1ad9ddef7f3
Original file line number Diff line number Diff line change @@ -217,6 +217,9 @@ fn mk_native(@type_store ts) -> t { ret gen_ty(ts, ty_native); }
217
217
// Returns the one-level-deep type structure of the given type.
218
218
fn struct ( t typ ) -> sty { ret typ. struct ; }
219
219
220
+ // Returns the canonical name of the given type.
221
+ fn cname ( t typ ) -> option. t[ str ] { ret typ. cname ; }
222
+
220
223
221
224
// Stringification
222
225
@@ -346,7 +349,7 @@ fn ty_to_str(&t typ) -> str {
346
349
}
347
350
348
351
case ( ty_obj ( ?meths) ) {
349
- alt ( typ . cname ) {
352
+ alt ( cname ( typ ) ) {
350
353
case ( some[ str] ( ?cs) ) {
351
354
s += cs;
352
355
}
@@ -1214,15 +1217,15 @@ fn eq_ty_full(&t a, &t b) -> bool {
1214
1217
}
1215
1218
1216
1219
// Check canonical names.
1217
- alt ( a . cname) {
1220
+ alt ( cname( a ) ) {
1218
1221
case ( none[ str ] ) {
1219
- alt ( b . cname) {
1222
+ alt ( cname( b ) ) {
1220
1223
case ( none[ str ] ) { /* ok */ }
1221
1224
case ( _) { ret false; }
1222
1225
}
1223
1226
}
1224
1227
case ( some[ str ] ( ?s_a) ) {
1225
- alt ( b . cname) {
1228
+ alt ( cname( b ) ) {
1226
1229
case ( some[ str ] ( ?s_b) ) {
1227
1230
if ( !_str. eq( s_a, s_b) ) { ret false; }
1228
1231
}
You can’t perform that action at this time.
0 commit comments