]> git.lizzy.rs Git - rust.git/commitdiff
auto merge of #8362 : sfackler/rust/env, r=alexcrichton
authorbors <bors@rust-lang.org>
Fri, 9 Aug 2013 12:35:06 +0000 (05:35 -0700)
committerbors <bors@rust-lang.org>
Fri, 9 Aug 2013 12:35:06 +0000 (05:35 -0700)
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.

Fixes #2248.

1  2 
src/librustc/driver/driver.rs
src/librustc/middle/resolve.rs
src/librustc/rustc.rs
src/libsyntax/ext/base.rs

Simple merge
Simple merge
Simple merge
Simple merge