Fix an error message to not refer to "block type". Closes #2423.
This commit is contained in:
parent
98766e388e
commit
5d1c29912d
@ -15,7 +15,8 @@ fn visit_expr(ex: @expr, cx: ctx, v: visit::vt<ctx>) {
|
||||
if !cx.allow_block {
|
||||
alt ty::get(ty::expr_ty(cx.tcx, ex)).struct {
|
||||
ty::ty_fn({proto: p, _}) if is_blockish(p) {
|
||||
cx.tcx.sess.span_err(ex.span, "expressions with block type \
|
||||
cx.tcx.sess.span_err(ex.span,
|
||||
"expressions with stack closure type \
|
||||
can only appear in callee or (by-ref) argument position");
|
||||
}
|
||||
_ {}
|
||||
|
@ -1,4 +1,4 @@
|
||||
// error-pattern: block type can only appear
|
||||
// error-pattern: stack closure type can only appear
|
||||
|
||||
fn lol(f: fn()) -> fn() { ret f; }
|
||||
fn main() {
|
||||
|
Loading…
Reference in New Issue
Block a user