Convert #env to istrs. Temporarily disable usage in rustc. Issue #855

This commit is contained in:
Brian Anderson 2011-08-30 14:57:59 -07:00 committed by Brian Anderson
parent 04928ed3f0
commit eb70267e5e
3 changed files with 5 additions and 3 deletions

View File

@ -256,7 +256,9 @@ fn pretty_print_input(sess: session::session, cfg: ast::crate_cfg,
fn version(argv0: &istr) {
let vers = "unknown version";
let env_vers = #env["CFG_VERSION"];
// FIXME: Restore after istr conversion
//let env_vers = #env["CFG_VERSION"];
let env_vers = "FIXME";
if str::byte_len(env_vers) != 0u { vers = env_vers; }
io::stdout().write_str(
istr::from_estr(#fmt["%s %s\n",

View File

@ -36,7 +36,7 @@ fn expand_syntax_ext(cx: &ext_ctxt, sp: codemap::span, arg: @ast::expr,
}
fn make_new_str(cx: &ext_ctxt, sp: codemap::span, s: &istr) -> @ast::expr {
ret make_new_lit(cx, sp, ast::lit_str(s, ast::sk_rc));
ret make_new_lit(cx, sp, ast::lit_str(s, ast::sk_unique));
}
//
// Local Variables:

View File

@ -1,3 +1,3 @@
// error-pattern:malformed #env call
fn main() { #env["one", "two"]; }
fn main() { #env[~"one", ~"two"]; }