Skip to content

Commit 0218ff3

Browse files
committed
---
yaml --- r: 1504 b: refs/heads/master c: f668228 h: refs/heads/master v: v3
1 parent ae98ef0 commit 0218ff3

File tree

4 files changed

+16
-2
lines changed

4 files changed

+16
-2
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11
---
2-
refs/heads/master: 39b05632057a9d9e71cbf7b486c26f70c84f0c14
2+
refs/heads/master: f6682280f3e3e8923c283df8277964b6cbf8d8b8

trunk/src/comp/middle/trans.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1144,6 +1144,8 @@ fn linearize_ty_params(@block_ctxt cx, @ty.t t)
11441144
}
11451145
ret t;
11461146
}
1147+
1148+
fn fold_tag_ty(@ty.t t) -> @ty.t { ret t; }
11471149
}
11481150

11491151

trunk/src/comp/middle/ty.rs

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -294,6 +294,7 @@ fn ty_to_str(&@t typ) -> str {
294294

295295
type ty_fold = state obj {
296296
fn fold_simple_ty(@t ty) -> @t;
297+
fn fold_tag_ty(@t ty) -> @t;
297298
};
298299

299300
fn fold_ty(ty_fold fld, @t ty) -> @t {
@@ -322,7 +323,8 @@ fn fold_ty(ty_fold fld, @t ty) -> @t {
322323
for (@t subty in subtys) {
323324
new_subtys += vec(fold_ty(fld, subty));
324325
}
325-
ret rewrap(ty, ty_tag(tid, new_subtys));
326+
auto typ = rewrap(ty, ty_tag(tid, new_subtys));
327+
ret fld.fold_tag_ty(typ);
326328
}
327329
case (ty_tup(?subtys)) {
328330
let vec[@t] new_subtys = vec();
@@ -611,6 +613,8 @@ fn count_ty_params(@t ty) -> uint {
611613
}
612614
ret ty;
613615
}
616+
617+
fn fold_tag_ty(@t ty) -> @t { ret ty; }
614618
}
615619

616620
let vec[ast.def_id] param_ids_inner = vec();
@@ -1429,6 +1433,8 @@ fn unify(@ty.t expected, @ty.t actual, &unify_handler handler)
14291433
}
14301434
}
14311435
}
1436+
1437+
fn fold_tag_ty(@t typ) -> @t { ret typ; }
14321438
}
14331439

14341440
ret ty.fold_ty(folder(bindings), typ);
@@ -1548,6 +1554,8 @@ fn replace_type_params(@t typ, hashmap[ast.def_id,@t] param_map) -> @t {
15481554
}
15491555
}
15501556
}
1557+
1558+
fn fold_tag_ty(@t typ) -> @t { ret typ; }
15511559
}
15521560
auto replacer = param_replacer(param_map);
15531561
ret fold_ty(replacer, typ);

trunk/src/comp/middle/typeck.rs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -73,6 +73,8 @@ fn generalize_ty(@crate_ctxt cx, @ty.t t) -> @ty.t {
7373
}
7474
ret t;
7575
}
76+
77+
fn fold_tag_ty(@ty.t t) -> @ty.t { ret t; }
7678
}
7779

7880
auto generalizer = ty_generalizer(cx, @common.new_def_hash[@ty.t]());
@@ -114,6 +116,8 @@ fn substitute_ty_params(&@crate_ctxt ccx,
114116
case (_) { ret typ; }
115117
}
116118
}
119+
120+
fn fold_tag_ty(@ty.t typ) -> @ty.t { ret typ; }
117121
}
118122

119123
fn hash_int(&int x) -> uint { ret x as uint; }

0 commit comments

Comments
 (0)