From 74ff7f957fa1a1b3c5052fdc263c29120a1e30fc Mon Sep 17 00:00:00 2001 From: Josh Matthews Date: Mon, 29 May 2017 14:51:23 -0400 Subject: [PATCH 1/2] Update rustc to 03bed655142dd5e42ba4539de53b3663d8a123e0. --- rust-commit-hash | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/rust-commit-hash b/rust-commit-hash index 22a3daa7544..ac9c5bcdd55 100644 --- a/rust-commit-hash +++ b/rust-commit-hash @@ -1 +1 @@ -e17a1227ac779a181b2839998e26a7e4e434c2a0 +03bed655142dd5e42ba4539de53b3663d8a123e0 From be98fef8f764f88834cfbbf4dcc75303bd4cdec2 Mon Sep 17 00:00:00 2001 From: Josh Matthews Date: Mon, 29 May 2017 14:52:44 -0400 Subject: [PATCH 2/2] Conditionally define macro that's only used in Linux builds. --- components/profile/mem.rs | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/components/profile/mem.rs b/components/profile/mem.rs index 5fed9835414..6046d84145c 100644 --- a/components/profile/mem.rs +++ b/components/profile/mem.rs @@ -505,11 +505,6 @@ mod system_reporter { None } - // Like std::macros::try!, but for Option<>. - macro_rules! option_try( - ($e:expr) => (match $e { Some(e) => e, None => return None }) - ); - #[cfg(target_os = "linux")] fn page_size() -> usize { unsafe { @@ -522,6 +517,11 @@ mod system_reporter { use std::fs::File; use std::io::Read; + // Like std::macros::try!, but for Option<>. + macro_rules! option_try( + ($e:expr) => (match $e { Some(e) => e, None => return None }) + ); + let mut f = option_try!(File::open("/proc/self/statm").ok()); let mut contents = String::new(); option_try!(f.read_to_string(&mut contents).ok());