about summary refs log tree commit diff
path: root/src/libstd
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2020-02-29 20:23:10 +0000
committerbors <bors@rust-lang.org>2020-02-29 20:23:10 +0000
commitd3c79346a3e7ddbb5fb417810f226ac5a9209007 (patch)
tree3a06e2bd6ae80a87209ec3792d7979e00a2fe3fd /src/libstd
parent4f0edbdfe5f111c43a5e06f68186b95141d1f6c8 (diff)
parentad200af5c4cb4296b7dfcfab68fd8f1573f149e4 (diff)
downloadrust-d3c79346a3e7ddbb5fb417810f226ac5a9209007.tar.gz
rust-d3c79346a3e7ddbb5fb417810f226ac5a9209007.zip
Auto merge of #69590 - Dylan-DPC:rollup-i3z0sic, r=Dylan-DPC
Rollup of 7 pull requests

Successful merges:

 - #69504 (Use assert_ne in hash tests)
 - #69571 (remove unneeded .as_ref() calls.)
 - #69572 (use .iter() instead of .into_iter() on references)
 - #69581 (fix aliasing violation in align_to_mut)
 - #69582 (improve transmute and Vec::from_raw_parts docs)
 - #69584 (Correct comment to match behavior)
 - #69587 (rustc_parse: Tweak the function parameter name check)

Failed merges:

r? @ghost
Diffstat (limited to 'src/libstd')
-rw-r--r--src/libstd/path.rs2
-rw-r--r--src/libstd/time.rs2
2 files changed, 2 insertions, 2 deletions
diff --git a/src/libstd/path.rs b/src/libstd/path.rs
index a703cb748e0..b8361d3e825 100644
--- a/src/libstd/path.rs
+++ b/src/libstd/path.rs
@@ -2011,7 +2011,7 @@ impl Path {
     #[stable(feature = "rust1", since = "1.0.0")]
     pub fn file_name(&self) -> Option<&OsStr> {
         self.components().next_back().and_then(|p| match p {
-            Component::Normal(p) => Some(p.as_ref()),
+            Component::Normal(p) => Some(p),
             _ => None,
         })
     }
diff --git a/src/libstd/time.rs b/src/libstd/time.rs
index 68a54915873..c36e78b1d00 100644
--- a/src/libstd/time.rs
+++ b/src/libstd/time.rs
@@ -284,7 +284,7 @@ impl Instant {
     }
 
     /// Returns the amount of time elapsed from another instant to this one,
-    /// or zero duration if that instant is earlier than this one.
+    /// or zero duration if that instant is later than this one.
     ///
     /// # Examples
     ///