This website requires JavaScript.
Explore
Help
Sign in
bjoernager
/
rust
Watch
1
Fork
You've already forked rust
0
Code
Activity
b6f6104a1f
rust
/
tests
/
ui
/
extenv
/
extenv-too-many-args.rs
2 lines
82 B
Rust
Raw
Normal View
History
Unescape
Escape
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
2013-08-07 00:50:23 -04:00
fn
main
(
)
{
env!
(
"
one
"
,
"
two
"
,
"
three
"
)
;
}
//~ ERROR: env! takes 1 or 2 arguments
Copy permalink