diff options
| author | Brian Anderson <banderson@mozilla.com> | 2012-03-19 14:28:15 -0700 |
|---|---|---|
| committer | Brian Anderson <banderson@mozilla.com> | 2012-03-19 14:28:42 -0700 |
| commit | bbfa08d9474bd08b03718639ad82315d66097e6e (patch) | |
| tree | 954a8d14a3519d5625540096c1cfe9b2638b3fef /src | |
| parent | a0c6ad0c510ca8b6b810ebb36bfa42c4a29b62a2 (diff) | |
| download | rust-bbfa08d9474bd08b03718639ad82315d66097e6e.tar.gz rust-bbfa08d9474bd08b03718639ad82315d66097e6e.zip | |
rustc: Stop generating the flag_none #fmt flag. Issue #1993
Diffstat (limited to 'src')
| -rw-r--r-- | src/libcore/extfmt.rs | 7 | ||||
| -rw-r--r-- | src/rustc/syntax/ext/fmt.rs | 7 |
2 files changed, 1 insertions, 13 deletions
diff --git a/src/libcore/extfmt.rs b/src/libcore/extfmt.rs index e9b783a446b..ccec7001369 100644 --- a/src/libcore/extfmt.rs +++ b/src/libcore/extfmt.rs @@ -269,12 +269,7 @@ mod rt { flag_space_for_sign, flag_sign_always, flag_alternate, - - - // FIXME: This is a hack to avoid creating 0-length vec exprs, - // which have some difficulty typechecking currently. See - // comments in front::extfmt::make_flags - // (once #1993 is addressed, this won't be necessary) + // FIXME(1993): This is no longer needed. Remove after a snapshot flag_none, } enum count { count_is(int), count_implied, } diff --git a/src/rustc/syntax/ext/fmt.rs b/src/rustc/syntax/ext/fmt.rs index 29b19a2d66c..d12e36685bf 100644 --- a/src/rustc/syntax/ext/fmt.rs +++ b/src/rustc/syntax/ext/fmt.rs @@ -68,13 +68,6 @@ fn pieces_to_expr(cx: ext_ctxt, sp: span, pieces: [piece], args: [@ast::expr]) } flagexprs += [make_rt_path_expr(cx, sp, fstr)]; } - // FIXME: 0-length vectors can't have their type inferred - // through the rec that these flags are a member of, so - // this is a hack placeholder flag - - if vec::len::<@ast::expr>(flagexprs) == 0u { - flagexprs += [make_rt_path_expr(cx, sp, "flag_none")]; - } ret mk_vec_e(cx, sp, flagexprs); } fn make_count(cx: ext_ctxt, sp: span, cnt: count) -> @ast::expr { |
