@@ -46,7 +46,6 @@ use vec::Vec;
46
46
47
47
use sys:: os_str:: { Buf , Slice } ;
48
48
use sys_common:: { AsInner , IntoInner , FromInner } ;
49
- use super :: AsOsStr ;
50
49
51
50
/// Owned, mutable OS strings.
52
51
#[ derive( Clone ) ]
@@ -226,14 +225,6 @@ impl OsStr {
226
225
s. as_ref ( )
227
226
}
228
227
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
-
237
228
/// Yields a `&str` slice if the `OsStr` is valid unicode.
238
229
///
239
230
/// This conversion may entail doing a check for UTF-8 validity.
@@ -378,46 +369,6 @@ impl ToOwned for OsStr {
378
369
fn to_owned ( & self ) -> OsString { self . to_os_string ( ) }
379
370
}
380
371
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
-
421
372
#[ stable( feature = "rust1" , since = "1.0.0" ) ]
422
373
impl AsRef < OsStr > for OsStr {
423
374
fn as_ref ( & self ) -> & OsStr {
0 commit comments