about summary refs log tree commit diff
path: root/src/libstd
diff options
context:
space:
mode:
authorManish Goregaokar <manishsmail@gmail.com>2015-04-17 18:14:17 +0530
committerManish Goregaokar <manishsmail@gmail.com>2015-04-17 18:32:25 +0530
commit3118cd7dad4736385fbefa4b07b1d339590fce6d (patch)
tree8f2c803a8693a6b5740995098481524056c1be3d /src/libstd
parent373463615a5841a7041ea1c937d0b00872206971 (diff)
parent53b7a06fafd00627d721d168bc993152a0f265c8 (diff)
downloadrust-3118cd7dad4736385fbefa4b07b1d339590fce6d.tar.gz
rust-3118cd7dad4736385fbefa4b07b1d339590fce6d.zip
Rollup merge of #24452 - tbu-:pr_file_path, r=aturon
 Fixes #22190.
Diffstat (limited to 'src/libstd')
-rw-r--r--src/libstd/fs.rs13
1 files changed, 6 insertions, 7 deletions
diff --git a/src/libstd/fs.rs b/src/libstd/fs.rs
index d30d44a04d3..8af3311c426 100644
--- a/src/libstd/fs.rs
+++ b/src/libstd/fs.rs
@@ -51,7 +51,6 @@ use vec::Vec;
 #[stable(feature = "rust1", since = "1.0.0")]
 pub struct File {
     inner: fs_imp::File,
-    path: Option<PathBuf>,
 }
 
 /// Metadata information about a file.
@@ -193,12 +192,12 @@ impl File {
         OpenOptions::new().write(true).create(true).truncate(true).open(path)
     }
 
-    /// Returns the original path that was used to open this file.
+    /// Returns `None`.
     #[unstable(feature = "file_path",
-               reason = "this abstraction is imposed by this library instead \
-                         of the underlying OS and may be removed")]
+               reason = "this abstraction was imposed by this library and was removed")]
+    #[deprecated(since = "1.0.0", reason = "abstraction was removed")]
     pub fn path(&self) -> Option<&Path> {
-        self.path.as_ref().map(|p| &**p)
+        None
     }
 
     /// Attempts to sync all OS-internal metadata to disk.
@@ -302,7 +301,7 @@ impl AsInner<fs_imp::File> for File {
 }
 impl FromInner<fs_imp::File> for File {
     fn from_inner(f: fs_imp::File) -> File {
-        File { inner: f, path: None }
+        File { inner: f }
     }
 }
 
@@ -470,7 +469,7 @@ impl OpenOptions {
     pub fn open<P: AsRef<Path>>(&self, path: P) -> io::Result<File> {
         let path = path.as_ref();
         let inner = try!(fs_imp::File::open(path, &self.0));
-        Ok(File { path: Some(path.to_path_buf()), inner: inner })
+        Ok(File { inner: inner })
     }
 }