@@ -46,7 +46,6 @@ use vec::Vec;
4646
4747use sys:: os_str:: { Buf , Slice } ;
4848use sys_common:: { AsInner , IntoInner , FromInner } ;
49- use super :: AsOsStr ;
5049
5150/// Owned, mutable OS strings.
5251#[ derive( Clone ) ]
@@ -226,14 +225,6 @@ impl OsStr {
226225 s. as_ref ( )
227226 }
228227
229- /// Coerces directly from a `&str` slice to a `&OsStr` slice.
230- #[ stable( feature = "rust1" , since = "1.0.0" ) ]
231- #[ deprecated( since = "1.0.0" ,
232- reason = "use `OsStr::new` instead" ) ]
233- pub fn from_str ( s : & str ) -> & OsStr {
234- unsafe { mem:: transmute ( Slice :: from_str ( s) ) }
235- }
236-
237228 /// Yields a `&str` slice if the `OsStr` is valid unicode.
238229 ///
239230 /// This conversion may entail doing a check for UTF-8 validity.
@@ -378,46 +369,6 @@ impl ToOwned for OsStr {
378369 fn to_owned ( & self ) -> OsString { self . to_os_string ( ) }
379370}
380371
381- #[ stable( feature = "rust1" , since = "1.0.0" ) ]
382- #[ deprecated( since = "1.0.0" , reason = "trait is deprecated" ) ]
383- impl < ' a , T : AsOsStr + ?Sized > AsOsStr for & ' a T {
384- fn as_os_str ( & self ) -> & OsStr {
385- ( * self ) . as_os_str ( )
386- }
387- }
388-
389- #[ stable( feature = "rust1" , since = "1.0.0" ) ]
390- #[ deprecated( since = "1.0.0" , reason = "trait is deprecated" ) ]
391- impl AsOsStr for OsStr {
392- fn as_os_str ( & self ) -> & OsStr {
393- self
394- }
395- }
396-
397- #[ stable( feature = "rust1" , since = "1.0.0" ) ]
398- #[ deprecated( since = "1.0.0" , reason = "trait is deprecated" ) ]
399- impl AsOsStr for OsString {
400- fn as_os_str ( & self ) -> & OsStr {
401- & self [ ..]
402- }
403- }
404-
405- #[ stable( feature = "rust1" , since = "1.0.0" ) ]
406- #[ deprecated( since = "1.0.0" , reason = "trait is deprecated" ) ]
407- impl AsOsStr for str {
408- fn as_os_str ( & self ) -> & OsStr {
409- unsafe { mem:: transmute ( Slice :: from_str ( self ) ) }
410- }
411- }
412-
413- #[ stable( feature = "rust1" , since = "1.0.0" ) ]
414- #[ deprecated( since = "1.0.0" , reason = "trait is deprecated" ) ]
415- impl AsOsStr for String {
416- fn as_os_str ( & self ) -> & OsStr {
417- unsafe { mem:: transmute ( Slice :: from_str ( self ) ) }
418- }
419- }
420-
421372#[ stable( feature = "rust1" , since = "1.0.0" ) ]
422373impl AsRef < OsStr > for OsStr {
423374 fn as_ref ( & self ) -> & OsStr {
0 commit comments