about summary refs log tree commit diff
path: root/src/libstd
diff options
context:
space:
mode:
authorLzu Tao <taolzu@gmail.com>2020-01-10 18:48:15 +0000
committerLzu Tao <taolzu@gmail.com>2020-01-10 18:48:15 +0000
commiteca1e8bd9beeaabbc240ad342892f26998ad7f35 (patch)
tree7bfb6cc835352c4b51d9083c603b6ff8fcb8a4a2 /src/libstd
parent137a31d6923f229ffb5ed78772d02ecda3c7c53c (diff)
downloadrust-eca1e8bd9beeaabbc240ad342892f26998ad7f35.tar.gz
rust-eca1e8bd9beeaabbc240ad342892f26998ad7f35.zip
Inline PathBuf::deref to make it zero cost
Diffstat (limited to 'src/libstd')
-rw-r--r--src/libstd/path.rs2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/libstd/path.rs b/src/libstd/path.rs
index fbbdc1ddac2..f00ef269309 100644
--- a/src/libstd/path.rs
+++ b/src/libstd/path.rs
@@ -1535,7 +1535,7 @@ impl fmt::Debug for PathBuf {
 #[stable(feature = "rust1", since = "1.0.0")]
 impl ops::Deref for PathBuf {
     type Target = Path;
-
+    #[inline]
     fn deref(&self) -> &Path {
         Path::new(&self.inner)
     }