提交 8733386b 编写于 作者: M Marijn Haverbeke

Make sure fold_ty preserves associated def_ids

Closes #1884
上级 0f00d9a7
......@@ -607,6 +607,10 @@ fn fold_ty(cx: ctxt, fld: fold_mode, ty_0: t) -> t {
cx.sess.fatal("Unsupported sort of type in fold_ty");
}
}
alt tb.o_def_id {
some(did) { ty = mk_t_with_id(cx, get(ty).struct, some(did)); }
_ {}
}
// If this is a general type fold, then we need to run it now.
alt fld { fm_general(folder) { ret folder(ty); } _ { ret ty; } }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册