From 941852eef300b3bee42fc6e2ee48cbf40cb9fc3f Mon Sep 17 00:00:00 2001 From: Marco A L Barbosa Date: Fri, 6 Oct 2017 11:41:04 -0300 Subject: Fix some docs summary nits --- src/liballoc/fmt.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/liballoc') 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 -- cgit 1.4.1-3-g733a5 From cbcaf736f820f33f619d3c9fe3d997e9e69d779e Mon Sep 17 00:00:00 2001 From: Marco A L Barbosa Date: Mon, 20 Nov 2017 14:41:53 -0200 Subject: Print the address of the pointed value in Pointer impl for Rc and Arc --- src/liballoc/arc.rs | 2 +- src/liballoc/rc.rs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'src/liballoc') 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 fmt::Debug for Arc { #[stable(feature = "rust1", since = "1.0.0")] impl fmt::Pointer for Arc { 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/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 fmt::Debug for Rc { #[stable(feature = "rust1", since = "1.0.0")] impl fmt::Pointer for Rc { fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { - fmt::Pointer::fmt(&self.ptr, f) + fmt::Pointer::fmt(&(&**self as *const T), f) } } -- cgit 1.4.1-3-g733a5 From b3baa835fc4f92376c1528fc7f0ea7e988773fee Mon Sep 17 00:00:00 2001 From: Benjamin Hoffmeyer Date: Mon, 20 Nov 2017 13:37:56 -0500 Subject: Fix doc tests for trim_right_matches --- src/liballoc/str.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/liballoc') diff --git a/src/liballoc/str.rs b/src/liballoc/str.rs index f68ee847eb3..026825b3275 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'), "fooX"); /// ``` #[stable(feature = "rust1", since = "1.0.0")] pub fn trim_right_matches<'a, P: Pattern<'a>>(&'a self, pat: P) -> &'a str -- cgit 1.4.1-3-g733a5 From f69d4d44d8de9edbf94e240bbd2ba252c6937179 Mon Sep 17 00:00:00 2001 From: Benjamin Hoffmeyer Date: Mon, 20 Nov 2017 13:47:42 -0500 Subject: Fix result for assert_eq --- src/liballoc/str.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/liballoc') diff --git a/src/liballoc/str.rs b/src/liballoc/str.rs index 026825b3275..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_right_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 -- cgit 1.4.1-3-g733a5