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.
This commit is contained in:
commit
ac49e65611
2 changed files with 2 additions and 3 deletions
|
|
@ -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());
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue