diff options
Diffstat (limited to 'src/test/ui/issues/issue-36023.rs')
-rw-r--r-- | src/test/ui/issues/issue-36023.rs | 24 |
1 files changed, 0 insertions, 24 deletions
diff --git a/src/test/ui/issues/issue-36023.rs b/src/test/ui/issues/issue-36023.rs deleted file mode 100644 index 64d92bf8c..000000000 --- a/src/test/ui/issues/issue-36023.rs +++ /dev/null @@ -1,24 +0,0 @@ -// run-pass -#![allow(unused_variables)] -use std::ops::Deref; - -fn main() { - if env_var("FOOBAR").as_ref().map(Deref::deref).ok() == Some("yes") { - panic!() - } - - let env_home: Result<String, ()> = Ok("foo-bar-baz".to_string()); - let env_home = env_home.as_ref().map(Deref::deref).ok(); - - if env_home == Some("") { panic!() } -} - -#[inline(never)] -fn env_var(s: &str) -> Result<String, VarError> { - Err(VarError::NotPresent) -} - -pub enum VarError { - NotPresent, - NotUnicode(String), -} |