about summary refs log tree commit diff
path: root/src/libstd/rt
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2013-12-06 22:21:18 -0800
committerbors <bors@rust-lang.org>2013-12-06 22:21:18 -0800
commit70d66ae08575203a361dae6b30dc33c03f13a9c7 (patch)
tree8216c2bda9bc6443e8c7c8812a0a6954e06965d5 /src/libstd/rt
parent820271df1c3d7899460c0fa25c1a7cf74d45d431 (diff)
parent142eb685f913e15494bfab9ec142e40f6bf92cc4 (diff)
downloadrust-70d66ae08575203a361dae6b30dc33c03f13a9c7.tar.gz
rust-70d66ae08575203a361dae6b30dc33c03f13a9c7.zip
auto merge of #10364 : Kimundi/rust/result_compose, r=alexcrichton
This implements parts of the changes to `Result` and `Option` I proposed and discussed in this thread: https://mail.mozilla.org/pipermail/rust-dev/2013-November/006254.html

This PR includes:
- Adding `ok()` and `err()` option adapters for both `Result` variants.
- Removing `get_ref`, `expect` and iterator constructors for `Result`, as they are reachable with the variant adapters.
- Removing `Result`s `ToStr` bound on the error type because of composability issues. (See https://mail.mozilla.org/pipermail/rust-dev/2013-November/006283.html)
- Some warning cleanups
Diffstat (limited to 'src/libstd/rt')
-rw-r--r--src/libstd/rt/local_ptr.rs1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/libstd/rt/local_ptr.rs b/src/libstd/rt/local_ptr.rs
index 803938589af..bff9390ee3b 100644
--- a/src/libstd/rt/local_ptr.rs
+++ b/src/libstd/rt/local_ptr.rs
@@ -48,6 +48,7 @@ pub unsafe fn borrow<T>(f: |&mut T|) {
 /// it wherever possible.
 #[cfg(not(windows), not(target_os = "android"))]
 pub mod compiled {
+    #[cfg(not(test))]
     use libc::c_void;
     use cast;
     use option::{Option, Some, None};