about summary refs log tree commit diff
path: root/src/libstd/sys/unix
diff options
context:
space:
mode:
authorSteven Fackler <sfackler@gmail.com>2014-11-06 00:05:53 -0800
committerSteven Fackler <sfackler@gmail.com>2014-11-17 07:35:51 -0800
commit3dcd2157403163789aaf21a9ab3c4d30a7c6494d (patch)
tree30cc4a448fe8380ae7107c6ea9b534a725adaec8 /src/libstd/sys/unix
parent0047dbe59c41b951d34ce6324f3a8c0e15d523e9 (diff)
downloadrust-3dcd2157403163789aaf21a9ab3c4d30a7c6494d.tar.gz
rust-3dcd2157403163789aaf21a9ab3c4d30a7c6494d.zip
Switch to purely namespaced enums
This breaks code that referred to variant names in the same namespace as
their enum. Reexport the variants in the old location or alter code to
refer to the new locations:

```
pub enum Foo {
    A,
    B
}

fn main() {
    let a = A;
}
```
=>
```
pub use self::Foo::{A, B};

pub enum Foo {
    A,
    B
}

fn main() {
    let a = A;
}
```
or
```
pub enum Foo {
    A,
    B
}

fn main() {
    let a = Foo::A;
}
```

[breaking-change]
Diffstat (limited to 'src/libstd/sys/unix')
-rw-r--r--src/libstd/sys/unix/process.rs1
-rw-r--r--src/libstd/sys/unix/timer.rs2
2 files changed, 3 insertions, 0 deletions
diff --git a/src/libstd/sys/unix/process.rs b/src/libstd/sys/unix/process.rs
index d7de841f958..81bc138ca91 100644
--- a/src/libstd/sys/unix/process.rs
+++ b/src/libstd/sys/unix/process.rs
@@ -7,6 +7,7 @@
 // <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
 // option. This file may not be copied, modified, or distributed
 // except according to those terms.
+use self::Req::*;
 
 use libc::{mod, pid_t, c_void, c_int};
 use c_str::CString;
diff --git a/src/libstd/sys/unix/timer.rs b/src/libstd/sys/unix/timer.rs
index 184ef3adce1..6ebbedb8e90 100644
--- a/src/libstd/sys/unix/timer.rs
+++ b/src/libstd/sys/unix/timer.rs
@@ -46,6 +46,8 @@
 //!
 //! Note that all time units in this file are in *milliseconds*.
 
+pub use self::Req::*;
+
 use libc;
 use mem;
 use os;