From bf2b4738163b196685198e91d7ce4e2761bb718e Mon Sep 17 00:00:00 2001 From: Nick Cameron Date: Wed, 28 Jan 2015 17:06:46 +1300 Subject: Rename FullRange to RangeFull --- src/libstd/ffi/os_str.rs | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'src/libstd/ffi') diff --git a/src/libstd/ffi/os_str.rs b/src/libstd/ffi/os_str.rs index 8fdc5547e46..18e2aa8c098 100644 --- a/src/libstd/ffi/os_str.rs +++ b/src/libstd/ffi/os_str.rs @@ -82,6 +82,7 @@ impl OsString { } } +#[cfg(stage0)] impl ops::Index for OsString { type Output = OsStr; @@ -91,6 +92,16 @@ impl ops::Index for OsString { } } +#[cfg(not(stage0))] +impl ops::Index for OsString { + type Output = OsStr; + + #[inline] + fn index(&self, _index: &ops::RangeFull) -> &OsStr { + unsafe { mem::transmute(self.inner.as_slice()) } + } +} + impl ops::Deref for OsString { type Target = OsStr; -- cgit 1.4.1-3-g733a5