about summary refs log tree commit diff
path: root/src/libstd
diff options
context:
space:
mode:
authorKevin Ballard <kevin@sb.org>2013-09-26 17:10:55 -0700
committerKevin Ballard <kevin@sb.org>2013-10-15 20:10:11 -0700
commit3a2735cb11efc997aa02646c13c008a883de6792 (patch)
tree5ee453e54afbff4cb74896ef7a818761839a3436 /src/libstd
parent179f50f7c8a4071eb4e28e5b812106d6a3c148c7 (diff)
downloadrust-3a2735cb11efc997aa02646c13c008a883de6792.tar.gz
rust-3a2735cb11efc997aa02646c13c008a883de6792.zip
path2: Convert typedefs to `pub use`s
Turns out you can't call static methods on typedefs. Use `pub use`
instead to work around this issue.
Diffstat (limited to 'src/libstd')
-rw-r--r--src/libstd/path2/mod.rs30
1 files changed, 15 insertions, 15 deletions
diff --git a/src/libstd/path2/mod.rs b/src/libstd/path2/mod.rs
index ba572cce78a..e385cea51f9 100644
--- a/src/libstd/path2/mod.rs
+++ b/src/libstd/path2/mod.rs
@@ -21,38 +21,38 @@ use vec;
 use vec::{CopyableVector, OwnedCopyableVector, OwnedVector};
 use vec::{ImmutableEqVector, ImmutableVector};
 
-pub mod posix;
-pub mod windows;
-
 /// Typedef for POSIX file paths.
 /// See `posix::Path` for more info.
-pub type PosixPath = posix::Path;
+pub use PosixPath = self::posix::Path;
 
 /// Typedef for Windows file paths.
 /// See `windows::Path` for more info.
-pub type WindowsPath = windows::Path;
+pub use WindowsPath = self::windows::Path;
 
 /// Typedef for the platform-native path type
 #[cfg(unix)]
-pub type Path = PosixPath;
+pub use Path = self::posix::Path;
 /// Typedef for the platform-native path type
 #[cfg(windows)]
-pub type Path = WindowsPath;
+pub use Path = self::windows::Path;
 
 /// Typedef for the POSIX path component iterator.
 /// See `posix::ComponentIter` for more info.
-pub type PosixComponentIter<'self> = posix::ComponentIter<'self>;
+pub use PosixComponentIter = self::posix::ComponentIter;
 
-// /// Typedef for the Windows path component iterator.
-// /// See `windows::ComponentIter` for more info.
-// pub type WindowsComponentIter<'self> = windows::ComponentIter<'self>;
+/// Typedef for the Windows path component iterator.
+/// See `windows::ComponentIter` for more info.
+pub use WindowsComponentIter = self::windows::ComponentIter;
 
 /// Typedef for the platform-native component iterator
 #[cfg(unix)]
-pub type ComponentIter<'self> = PosixComponentIter<'self>;
-// /// Typedef for the platform-native component iterator
-//#[cfg(windows)]
-//pub type ComponentIter<'self> = WindowsComponentIter<'self>;
+pub use ComponentIter = self::posix::ComponentIter;
+/// Typedef for the platform-native component iterator
+#[cfg(windows)]
+pub use ComponentIter = self::windows::ComponentIter;
+
+pub mod posix;
+pub mod windows;
 
 // Condition that is raised when a NUL is found in a byte vector given to a Path function
 condition! {