rustc: Remove the artificial block in ty.rs. Fixes self-hosting. Add a test case for this, XFAIL'd.
This commit is contained in:
parent
147a2d655f
commit
a833f152ba
|
@ -1905,7 +1905,7 @@ fn expr_ann(&@ast.expr e) -> ast.ann {
|
|||
// instead of "fn(&T) -> T with T = int". If this isn't what you want, see
|
||||
// expr_ty_params_and_ty() below.
|
||||
fn expr_ty(ctxt cx, @ast.expr expr) -> t {
|
||||
{ ret ann_to_monotype(cx, expr_ann(expr)); }
|
||||
ret ann_to_monotype(cx, expr_ann(expr));
|
||||
}
|
||||
|
||||
fn expr_ty_params_and_ty(ctxt cx, @ast.expr expr) -> tup(vec[t], t) {
|
||||
|
|
|
@ -0,0 +1,12 @@
|
|||
// xfail-stage0
|
||||
// xfail-stage1
|
||||
// xfail-stage2
|
||||
fn f() -> int {
|
||||
{ ret 3; }
|
||||
}
|
||||
|
||||
fn main() {
|
||||
assert(f() == 3);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue