提交 9f7e62ea 编写于 作者: B Brian Anderson

rustc: Fix a missing application of the operator in fold_ty

上级 fa3aa64b
......@@ -863,7 +863,7 @@ fn fold_substs(substs: substs, fldop: fn(t) -> t) -> substs {
// Folds types from the bottom up.
fn fold_ty(cx: ctxt, t0: t, fldop: fn(t) -> t) -> t {
let sty = fold_sty(get(t0).struct) {|t| fold_ty(cx, t, fldop) };
let sty = fold_sty(get(t0).struct) {|t| fold_ty(cx, fldop(t), fldop) };
fldop(mk_t(cx, sty))
}
......
// Regression test that rustc doesn't recurse infinitely substituting
// the boxed type parameter
type Tree<T> = {
mut parent: option<T>,
};
fn empty<T>() -> Tree<T> { fail }
class Box {
let tree: Tree<@Box>;
new() {
self.tree = empty();
}
}
enum layout_data = {
mut box: option<@Box>
};
fn main() { }
\ No newline at end of file
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册