|
1 | 1 | #![stable(feature = "metadata_ext", since = "1.1.0")]
|
2 | 2 | use crate::fs::Metadata;
|
3 |
| -#[allow(deprecated)] |
4 |
| -use crate::os::cygwin::raw; |
5 | 3 | use crate::sys_common::AsInner;
|
6 | 4 | /// OS-specific extensions to [`fs::Metadata`].
|
7 | 5 | ///
|
8 | 6 | /// [`fs::Metadata`]: crate::fs::Metadata
|
9 | 7 | #[stable(feature = "metadata_ext", since = "1.1.0")]
|
10 | 8 | pub trait MetadataExt {
|
11 |
| - /// Gain a reference to the underlying `stat` structure which contains |
12 |
| - /// the raw information returned by the OS. |
13 |
| - /// |
14 |
| - /// The contents of the returned `stat` are **not** consistent across |
15 |
| - /// Unix platforms. The `os::unix::fs::MetadataExt` trait contains the |
16 |
| - /// cross-Unix abstractions contained within the raw stat. |
17 |
| - #[stable(feature = "metadata_ext", since = "1.1.0")] |
18 |
| - #[deprecated( |
19 |
| - since = "1.8.0", |
20 |
| - note = "deprecated in favor of the accessor \ |
21 |
| - methods of this trait" |
22 |
| - )] |
23 |
| - #[allow(deprecated)] |
24 |
| - fn as_raw_stat(&self) -> &raw::stat; |
25 | 9 | #[stable(feature = "metadata_ext2", since = "1.8.0")]
|
26 | 10 | fn st_dev(&self) -> u64;
|
27 | 11 | #[stable(feature = "metadata_ext2", since = "1.8.0")]
|
@@ -61,10 +45,6 @@ pub trait MetadataExt {
|
61 | 45 | }
|
62 | 46 | #[stable(feature = "metadata_ext", since = "1.1.0")]
|
63 | 47 | impl MetadataExt for Metadata {
|
64 |
| - #[allow(deprecated)] |
65 |
| - fn as_raw_stat(&self) -> &raw::stat { |
66 |
| - unsafe { &*(self.as_inner().as_inner() as *const libc::stat as *const raw::stat) } |
67 |
| - } |
68 | 48 | fn st_dev(&self) -> u64 {
|
69 | 49 | self.as_inner().as_inner().st_dev as u64
|
70 | 50 | }
|
|
0 commit comments