Skip to content

Commit

Permalink
put option_try macro def under #[cfg(unix)]
Browse files Browse the repository at this point in the history
  • Loading branch information
est31 committed May 16, 2017
1 parent 25b7f10 commit 6dbd706
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/librustc/util/common.rs
Original file line number Diff line number Diff line change
Expand Up @@ -116,6 +116,7 @@ pub fn record_time<T, F>(accu: &Cell<Duration>, f: F) -> T where
}

// Like std::macros::try!, but for Option<>.
#[cfg(unix)]
macro_rules! option_try(
($e:expr) => (match $e { Some(e) => e, None => return None })
);
Expand Down

0 comments on commit 6dbd706

Please sign in to comment.