about summary refs log tree commit diff
path: root/src/libcore
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2019-07-30 03:38:54 +0000
committerbors <bors@rust-lang.org>2019-07-30 03:38:54 +0000
commit4eeaaa722d6ac6d24de6e4d3faefb7c44e674b37 (patch)
treeed3ee28acaee8ae750947dd3a224d9d1801e713d /src/libcore
parent04b88a9eba8abbac87eddcb2998beea09589c2c9 (diff)
parent91c10f8839156b3c3001271be17995806fb74e06 (diff)
downloadrust-4eeaaa722d6ac6d24de6e4d3faefb7c44e674b37.tar.gz
rust-4eeaaa722d6ac6d24de6e4d3faefb7c44e674b37.zip
Auto merge of #63124 - Centril:rollup-onohtqt, r=Centril
Rollup of 12 pull requests

Successful merges:

 - #61965 (Remove mentions of removed `offset_to` method from `align_offset` docs)
 - #62928 (Syntax: Recover on `for ( $pat in $expr ) $block`)
 - #63000 (Impl Debug for Chars)
 - #63083 (Make generic parameters always use modern hygiene)
 - #63087 (Add very simple edition check to tidy.)
 - #63093 (Properly check the defining scope of existential types)
 - #63096 (Add tests for some `existential_type` ICEs)
 - #63099 (vxworks: Remove Linux-specific comments.)
 - #63106 (ci: Skip installing SWIG/xz on OSX )
 - #63108 (Add links to None in Option doc)
 - #63109 (std: Fix a failing `fs` test on Windows)
 - #63111 (Add syntactic and semantic tests for rest patterns, i.e. `..`)

Failed merges:

r? @ghost
Diffstat (limited to 'src/libcore')
-rw-r--r--src/libcore/option.rs4
-rw-r--r--src/libcore/ptr/mod.rs4
-rw-r--r--src/libcore/str/mod.rs12
3 files changed, 15 insertions, 5 deletions
diff --git a/src/libcore/option.rs b/src/libcore/option.rs
index 70a87cfe5a7..7713e5761d4 100644
--- a/src/libcore/option.rs
+++ b/src/libcore/option.rs
@@ -8,7 +8,7 @@
 //! * Initial values
 //! * Return values for functions that are not defined
 //!   over their entire input range (partial functions)
-//! * Return value for otherwise reporting simple errors, where `None` is
+//! * Return value for otherwise reporting simple errors, where [`None`] is
 //!   returned on error
 //! * Optional struct fields
 //! * Struct fields that can be loaned or "taken"
@@ -752,7 +752,7 @@ impl<T> Option<T> {
         }
     }
 
-    /// Returns [`Some`] if exactly one of `self`, `optb` is [`Some`], otherwise returns `None`.
+    /// Returns [`Some`] if exactly one of `self`, `optb` is [`Some`], otherwise returns [`None`].
     ///
     /// [`Some`]: #variant.Some
     /// [`None`]: #variant.None
diff --git a/src/libcore/ptr/mod.rs b/src/libcore/ptr/mod.rs
index a7f6926de42..a1f96905dc9 100644
--- a/src/libcore/ptr/mod.rs
+++ b/src/libcore/ptr/mod.rs
@@ -1609,7 +1609,7 @@ impl<T: ?Sized> *const T {
     /// `usize::max_value()`.
     ///
     /// The offset is expressed in number of `T` elements, and not bytes. The value returned can be
-    /// used with the `offset` or `offset_to` methods.
+    /// used with the `add` method.
     ///
     /// There are no guarantees whatsover that offsetting the pointer will not overflow or go
     /// beyond the allocation that the pointer points into. It is up to the caller to ensure that
@@ -2410,7 +2410,7 @@ impl<T: ?Sized> *mut T {
     /// `usize::max_value()`.
     ///
     /// The offset is expressed in number of `T` elements, and not bytes. The value returned can be
-    /// used with the `offset` or `offset_to` methods.
+    /// used with the `add` method.
     ///
     /// There are no guarantees whatsover that offsetting the pointer will not overflow or go
     /// beyond the allocation that the pointer points into. It is up to the caller to ensure that
diff --git a/src/libcore/str/mod.rs b/src/libcore/str/mod.rs
index 4ecaa37460c..4faf9ff4d2e 100644
--- a/src/libcore/str/mod.rs
+++ b/src/libcore/str/mod.rs
@@ -464,7 +464,7 @@ Section: Iterators
 ///
 /// [`chars`]: ../../std/primitive.str.html#method.chars
 /// [`str`]: ../../std/primitive.str.html
-#[derive(Clone, Debug)]
+#[derive(Clone)]
 #[stable(feature = "rust1", since = "1.0.0")]
 pub struct Chars<'a> {
     iter: slice::Iter<'a, u8>
@@ -600,6 +600,16 @@ impl<'a> Iterator for Chars<'a> {
     }
 }
 
+#[stable(feature = "chars_debug_impl", since = "1.38.0")]
+impl fmt::Debug for Chars<'_> {
+    fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
+        write!(f, "Chars(")?;
+        f.debug_list().entries(self.clone()).finish()?;
+        write!(f, ")")?;
+        Ok(())
+    }
+}
+
 #[stable(feature = "rust1", since = "1.0.0")]
 impl<'a> DoubleEndedIterator for Chars<'a> {
     #[inline]