about summary refs log tree commit diff
path: root/src/libstd/rt
diff options
context:
space:
mode:
authorCorey Farwell <coreyf@rwell.org>2014-11-28 11:57:41 -0500
committerCorey Farwell <coreyf@rwell.org>2014-12-05 18:13:04 -0500
commit4ef16741e355754abd446acbd80e5afb784864c7 (patch)
treebfe4f64de5b3bcf88672424d0f66b5ad12fe7054 /src/libstd/rt
parent6f4c11be3b9706d1ba0e1b74b89de1478410a56f (diff)
downloadrust-4ef16741e355754abd446acbd80e5afb784864c7.tar.gz
rust-4ef16741e355754abd446acbd80e5afb784864c7.zip
Utilize fewer reexports
In regards to:

https://github.com/rust-lang/rust/issues/19253#issuecomment-64836729

This commit:

* Changes the #deriving code so that it generates code that utilizes fewer
  reexports (in particur Option::* and Result::*), which is necessary to
  remove those reexports in the future
* Changes other areas of the codebase so that fewer reexports are utilized
Diffstat (limited to 'src/libstd/rt')
-rw-r--r--src/libstd/rt/backtrace.rs13
-rw-r--r--src/libstd/rt/util.rs3
2 files changed, 9 insertions, 7 deletions
diff --git a/src/libstd/rt/backtrace.rs b/src/libstd/rt/backtrace.rs
index 159fc3080e8..3698a91855c 100644
--- a/src/libstd/rt/backtrace.rs
+++ b/src/libstd/rt/backtrace.rs
@@ -14,9 +14,9 @@
 
 use io::{IoResult, Writer};
 use iter::{Iterator, IteratorExt};
-use option::{Some, None};
+use option::Option::{Some, None};
 use os;
-use result::{Ok, Err};
+use result::Result::{Ok, Err};
 use str::{StrPrelude, from_str};
 use sync::atomic;
 use unicode::char::UnicodeChar;
@@ -236,8 +236,9 @@ mod imp {
     use io::{IoResult, Writer};
     use libc;
     use mem;
-    use option::{Some, None, Option};
-    use result::{Ok, Err};
+    use option::Option;
+    use option::Option::{Some, None};
+    use result::Result::{Ok, Err};
     use sync::{StaticMutex, MUTEX_INIT};
 
     /// As always - iOS on arm uses SjLj exceptions and
@@ -664,9 +665,9 @@ mod imp {
     use libc;
     use mem;
     use ops::Drop;
-    use option::{Some, None};
+    use option::Option::{Some, None};
     use path::Path;
-    use result::{Ok, Err};
+    use result::Result::{Ok, Err};
     use sync::{StaticMutex, MUTEX_INIT};
     use slice::SlicePrelude;
     use str::StrPrelude;
diff --git a/src/libstd/rt/util.rs b/src/libstd/rt/util.rs
index 92657d1b59b..ce359c7b0e0 100644
--- a/src/libstd/rt/util.rs
+++ b/src/libstd/rt/util.rs
@@ -9,7 +9,8 @@
 // except according to those terms.
 
 use libc::uintptr_t;
-use option::{Some, None, Option};
+use option::Option;
+use option::Option::{Some, None};
 use os;
 use str::{FromStr, from_str, Str};
 use sync::atomic;