about summary refs log tree commit diff
path: root/src/liballoc
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2017-11-20 22:35:41 +0000
committerbors <bors@rust-lang.org>2017-11-20 22:35:41 +0000
commit1e44fee88d48e9f7844c6d316ae8540db19dc9fa (patch)
tree9172d777e1fb0167b82154a5391cf53ed9cac16c /src/liballoc
parent33374fa9d09e2a790979b31e61100dfed4b44139 (diff)
parent079a6e4cc2ade85faf8c7a4be1bbbd60c7aee9c1 (diff)
downloadrust-1e44fee88d48e9f7844c6d316ae8540db19dc9fa.tar.gz
rust-1e44fee88d48e9f7844c6d316ae8540db19dc9fa.zip
Auto merge of #46130 - kennytm:rollup, r=kennytm
Rollup of 9 pull requests

- Successful merges: #46082, #46088, #46092, #46107, #46119, #46121, #46122, #46124, #46128
- Failed merges:
Diffstat (limited to 'src/liballoc')
-rw-r--r--src/liballoc/arc.rs2
-rw-r--r--src/liballoc/fmt.rs2
-rw-r--r--src/liballoc/rc.rs2
-rw-r--r--src/liballoc/str.rs2
4 files changed, 4 insertions, 4 deletions
diff --git a/src/liballoc/arc.rs b/src/liballoc/arc.rs
index 9481cd4e1a4..fc0a3c0fd88 100644
--- a/src/liballoc/arc.rs
+++ b/src/liballoc/arc.rs
@@ -1328,7 +1328,7 @@ impl<T: ?Sized + fmt::Debug> fmt::Debug for Arc<T> {
 #[stable(feature = "rust1", since = "1.0.0")]
 impl<T: ?Sized> fmt::Pointer for Arc<T> {
     fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
-        fmt::Pointer::fmt(&self.ptr, f)
+        fmt::Pointer::fmt(&(&**self as *const T), f)
     }
 }
 
diff --git a/src/liballoc/fmt.rs b/src/liballoc/fmt.rs
index 58299d5d836..77f65412bd3 100644
--- a/src/liballoc/fmt.rs
+++ b/src/liballoc/fmt.rs
@@ -8,7 +8,7 @@
 // option. This file may not be copied, modified, or distributed
 // except according to those terms.
 
-//! Utilities for formatting and printing `String`s
+//! Utilities for formatting and printing `String`s.
 //!
 //! This module contains the runtime support for the [`format!`] syntax extension.
 //! This macro is implemented in the compiler to emit calls to this module in
diff --git a/src/liballoc/rc.rs b/src/liballoc/rc.rs
index 2f8620cc750..72b9fa0eb47 100644
--- a/src/liballoc/rc.rs
+++ b/src/liballoc/rc.rs
@@ -1072,7 +1072,7 @@ impl<T: ?Sized + fmt::Debug> fmt::Debug for Rc<T> {
 #[stable(feature = "rust1", since = "1.0.0")]
 impl<T: ?Sized> fmt::Pointer for Rc<T> {
     fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
-        fmt::Pointer::fmt(&self.ptr, f)
+        fmt::Pointer::fmt(&(&**self as *const T), f)
     }
 }
 
diff --git a/src/liballoc/str.rs b/src/liballoc/str.rs
index f68ee847eb3..6e8515f0b36 100644
--- a/src/liballoc/str.rs
+++ b/src/liballoc/str.rs
@@ -1734,7 +1734,7 @@ impl str {
     /// A more complex pattern, using a closure:
     ///
     /// ```
-    /// assert_eq!("1fooX".trim_left_matches(|c| c == '1' || c == 'X'), "fooX");
+    /// assert_eq!("1fooX".trim_right_matches(|c| c == '1' || c == 'X'), "1foo");
     /// ```
     #[stable(feature = "rust1", since = "1.0.0")]
     pub fn trim_right_matches<'a, P: Pattern<'a>>(&'a self, pat: P) -> &'a str