Skip to content

Commit c73ea09

Browse files
committed
---
yaml --- r: 11659 b: refs/heads/master c: 9b88219 h: refs/heads/master i: 11657: 03cac68 11655: 2e9c18f v: v3
1 parent fa68be4 commit c73ea09

File tree

3 files changed

+4
-17
lines changed

3 files changed

+4
-17
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
---
2-
refs/heads/master: cc99ce5bdd64942736e9db24244f2edded69610a
2+
refs/heads/master: 9b882197233c06454e376fd80adca7f4a80264ca
33
refs/heads/snap-stage1: e33de59e47c5076a89eadeb38f4934f58a3618a6
44
refs/heads/snap-stage3: 4a81779abd786ff22d71434c6d9a5917ea4cdfff
55
refs/heads/try: 2898dcc5d97da9427ac367542382b6239d9c0bbf

trunk/src/rustc/middle/typeck.rs

Lines changed: 3 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -463,31 +463,22 @@ fn ty_of_item(tcx: ty::ctxt, mode: mode, it: @ast::item)
463463
ast::item_res(decl, tps, _, _, _) {
464464
let {bounds, params} = mk_ty_params(tcx, tps);
465465
let t_arg = ty_of_arg(tcx, mode, decl.inputs[0]);
466-
let t = {
467-
let t0 = ty::mk_res(tcx, local_def(it.id), t_arg.ty, params);
468-
ty::mk_with_id(tcx, t0, def_id)
469-
};
466+
let t = ty::mk_res(tcx, local_def(it.id), t_arg.ty, params);
470467
let t_res = {bounds: bounds, ty: t};
471468
tcx.tcache.insert(local_def(it.id), t_res);
472469
ret t_res;
473470
}
474471
ast::item_enum(_, tps) {
475472
// Create a new generic polytype.
476473
let {bounds, params} = mk_ty_params(tcx, tps);
477-
let t = {
478-
let t0 = ty::mk_enum(tcx, local_def(it.id), params);
479-
ty::mk_with_id(tcx, t0, def_id)
480-
};
474+
let t = ty::mk_enum(tcx, local_def(it.id), params);
481475
let tpt = {bounds: bounds, ty: t};
482476
tcx.tcache.insert(local_def(it.id), tpt);
483477
ret tpt;
484478
}
485479
ast::item_iface(tps, ms) {
486480
let {bounds, params} = mk_ty_params(tcx, tps);
487-
let t = {
488-
let t0 = ty::mk_iface(tcx, local_def(it.id), params);
489-
ty::mk_with_id(tcx, t0, def_id)
490-
};
481+
let t = ty::mk_iface(tcx, local_def(it.id), params);
491482
let tpt = {bounds: bounds, ty: t};
492483
tcx.tcache.insert(local_def(it.id), tpt);
493484
ret tpt;
@@ -920,7 +911,6 @@ mod collect {
920911
let def_id = local_def(it.id);
921912
let t_arg = ty_of_arg(tcx, m_collect, decl.inputs[0]);
922913
let t_res = ty::mk_res(tcx, def_id, t_arg.ty, params);
923-
let t_res = ty::mk_with_id(tcx, t_res, def_id);
924914
let t_ctor = ty::mk_fn(tcx, {
925915
proto: ast::proto_box,
926916
inputs: [{mode: ast::expl(ast::by_copy) with t_arg}],

trunk/src/rustc/util/ppaux.rs

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -123,9 +123,6 @@ fn ty_to_str(cx: ctxt, typ: t) -> str {
123123
}
124124
ty_enum(did, tps) | ty_res(did, _, tps) | ty_iface(did, tps) |
125125
ty_class(did, tps) {
126-
// Not sure why, but under some circumstances enum or resource types
127-
// do not have an associated id. I didn't investigate enough to know
128-
// if there is a good reason for this. - Niko, 2012-02-10
129126
let path = ty::item_path(cx, did);
130127
let base = ast_map::path_to_str(path);
131128
parameterized(cx, base, tps)

0 commit comments

Comments
 (0)