]> git.lizzy.rs Git - rust.git/blobdiff - src/libstd/path.rs
Rollup merge of #68093 - GuillaumeGomez:fix-deref-impl-typedef, r=oli-obk
[rust.git] / src / libstd / path.rs
index f00ef2693092185cdb4b54a932f13f4459681151..a703cb748e06b4e111d7f649e9444809c7dec470 100644 (file)
@@ -1475,6 +1475,7 @@ impl From<OsString> for PathBuf {
     /// Converts a `OsString` into a `PathBuf`
     ///
     /// This conversion does not allocate or copy memory.
+    #[inline]
     fn from(s: OsString) -> PathBuf {
         PathBuf { inner: s }
     }
@@ -2655,6 +2656,7 @@ fn as_ref(&self) -> &Path {
 
 #[stable(feature = "rust1", since = "1.0.0")]
 impl AsRef<Path> for str {
+    #[inline]
     fn as_ref(&self) -> &Path {
         Path::new(self)
     }
@@ -2669,6 +2671,7 @@ fn as_ref(&self) -> &Path {
 
 #[stable(feature = "rust1", since = "1.0.0")]
 impl AsRef<Path> for PathBuf {
+    #[inline]
     fn as_ref(&self) -> &Path {
         self
     }