diff options
| author | bors <bors@rust-lang.org> | 2013-08-14 04:41:20 -0700 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2013-08-14 04:41:20 -0700 |
| commit | ac49e656111cdd1727988bbbf3d3b9be554ae391 (patch) | |
| tree | 34f5a3f840468e51f05827f0d228d041f0015487 /src/test | |
| parent | cd656c74f67a289bb14c7758847a0fdd2e61d9a1 (diff) | |
| parent | f3a79cf66722a917a59376b0ad60a0a370c48b8b (diff) | |
| download | rust-ac49e656111cdd1727988bbbf3d3b9be554ae391.tar.gz rust-ac49e656111cdd1727988bbbf3d3b9be554ae391.zip | |
auto merge of #8440 : sfackler/rust/env-fix, r=pcwalton
The type of the result of option_env! was not fully specified in the
None case, leading to type check failures in the case where the variable
was not defined (e.g. option_env!("FOO").is_none()).
Also cleaned up some compilation warnings.
Diffstat (limited to 'src/test')
| -rw-r--r-- | src/test/run-pass/extoption_env-not-defined.rs | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/src/test/run-pass/extoption_env-not-defined.rs b/src/test/run-pass/extoption_env-not-defined.rs index 412efcc25a8..cbf4c36c5df 100644 --- a/src/test/run-pass/extoption_env-not-defined.rs +++ b/src/test/run-pass/extoption_env-not-defined.rs @@ -9,6 +9,5 @@ // except according to those terms. fn main() { - let opt: Option<&'static str> = option_env!("__HOPEFULLY_DOESNT_EXIST__"); - assert!(opt.is_none()); + assert!(option_env!("__HOPEFULLY_DOESNT_EXIST__").is_none()); } |
