This website requires JavaScript.
Explore
Help
Register
Sign In
mikros
/
rust
Watch
1
Star
0
Fork
0
You've already forked rust
Code
Issues
Pull Requests
Packages
Projects
Releases
Wiki
Activity
5ae8e23816
rust
/
tests
/
ui
/
extenv
/
extenv-no-args.rs
2 lines
61 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-06 23:50:23 -05:00
fn
main
(
)
{
env!
(
)
;
}
//~ ERROR: env! takes 1 or 2 arguments
Reference in New Issue
Copy Permalink