about summary refs log tree commit diff
path: root/src/libsyntax/ext/asm.rs
diff options
context:
space:
mode:
authorSteven Fackler <sfackler@gmail.com>2013-08-07 00:50:23 -0400
committerSteven Fackler <sfackler@gmail.com>2013-08-08 10:35:42 -0700
commitc3825c835197a97ff4f254802efde80335d3833b (patch)
tree9e9d9bca31ab992cc5de1434e7cbcf917261a3e6 /src/libsyntax/ext/asm.rs
parent9db698a81b0d68b093030fe52f941146aba65dd3 (diff)
downloadrust-c3825c835197a97ff4f254802efde80335d3833b.tar.gz
rust-c3825c835197a97ff4f254802efde80335d3833b.zip
env! syntax extension changes
env! aborts compilation of the specified environment variable is not
defined and takes an optional second argument containing a custom
error message. option_env! creates an Option<&'static str> containing
the value of the environment variable.

There are no run-pass tests that check the behavior when the environment
variable is defined since the test framework doesn't support setting
environment variables at compile time as opposed to runtime. However,
both env! and option_env! are used inside of rustc itself, which should
act as a sufficient test.

Close #2248
Diffstat (limited to 'src/libsyntax/ext/asm.rs')
-rw-r--r--src/libsyntax/ext/asm.rs4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/libsyntax/ext/asm.rs b/src/libsyntax/ext/asm.rs
index ee0ec664e1b..b5d97427baf 100644
--- a/src/libsyntax/ext/asm.rs
+++ b/src/libsyntax/ext/asm.rs
@@ -1,4 +1,4 @@
-// Copyright 2012 The Rust Project Developers. See the COPYRIGHT
+// Copyright 2012-2013 The Rust Project Developers. See the COPYRIGHT
 // file at the top-level directory of this distribution and at
 // http://rust-lang.org/COPYRIGHT.
 //
@@ -59,7 +59,7 @@ pub fn expand_asm(cx: @ExtCtxt, sp: span, tts: &[ast::token_tree])
         match state {
             Asm => {
                 asm = expr_to_str(cx, p.parse_expr(),
-                                  ~"inline assembly must be a string literal.");
+                                  "inline assembly must be a string literal.");
             }
             Outputs => {
                 while *p.token != token::EOF &&