about summary refs log tree commit diff
path: root/src/liballoc
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2019-04-15 16:24:19 +0000
committerbors <bors@rust-lang.org>2019-04-15 16:24:19 +0000
commit07133ac70cca85b2f91aedb76a21ece524bc0cb4 (patch)
treecfebf7d3b0fee04927f6274b02d2a78d3c00bb62 /src/liballoc
parent9217fe0e2f04d61dd29c9aaebee2c993705e1d26 (diff)
parent6434fe9ef58fbb59b23fa9bc667d98fb5c91ab0f (diff)
downloadrust-07133ac70cca85b2f91aedb76a21ece524bc0cb4.tar.gz
rust-07133ac70cca85b2f91aedb76a21ece524bc0cb4.zip
Auto merge of #59991 - Centril:rollup-bqxt4w3, r=Centril
Rollup of 6 pull requests

Successful merges:

 - #59648 (Add must_use annotations to Result::is_ok and is_err)
 - #59748 (Add summary and reference to Rust trademark guide)
 - #59779 (Uplift `get_def_path` from Clippy)
 - #59955 (bump stdsimd; make intra_doc_link_resolution_failure an error again; make lints more consistent)
 - #59978 (rustdoc: Remove default keyword from re-exported trait methods)
 - #59989 (Fix links to Atomic* in RELEASES.md)

Failed merges:

r? @ghost
Diffstat (limited to 'src/liballoc')
-rw-r--r--src/liballoc/borrow.rs1
-rw-r--r--src/liballoc/boxed.rs1
-rw-r--r--src/liballoc/lib.rs9
-rw-r--r--src/liballoc/slice.rs10
4 files changed, 17 insertions, 4 deletions
diff --git a/src/liballoc/borrow.rs b/src/liballoc/borrow.rs
index ee1799fad8e..d5e15b3719c 100644
--- a/src/liballoc/borrow.rs
+++ b/src/liballoc/borrow.rs
@@ -32,6 +32,7 @@ impl<'a, B: ?Sized> Borrow<B> for Cow<'a, B>
 /// from any borrow of a given type.
 #[stable(feature = "rust1", since = "1.0.0")]
 pub trait ToOwned {
+    /// The resulting type after obtaining ownership.
     #[stable(feature = "rust1", since = "1.0.0")]
     type Owned: Borrow<Self>;
 
diff --git a/src/liballoc/boxed.rs b/src/liballoc/boxed.rs
index 6a6a9146e24..8a3950718d7 100644
--- a/src/liballoc/boxed.rs
+++ b/src/liballoc/boxed.rs
@@ -760,6 +760,7 @@ impl<A, F: Fn<A> + ?Sized> Fn<A> for Box<F> {
 #[unstable(feature = "fnbox",
            reason = "will be deprecated if and when `Box<FnOnce>` becomes usable", issue = "28796")]
 pub trait FnBox<A>: FnOnce<A> {
+    /// Performs the call operation.
     fn call_box(self: Box<Self>, args: A) -> Self::Output;
 }
 
diff --git a/src/liballoc/lib.rs b/src/liballoc/lib.rs
index 7f3acc933d4..63b3fbbdaef 100644
--- a/src/liballoc/lib.rs
+++ b/src/liballoc/lib.rs
@@ -58,12 +58,13 @@
 #![no_std]
 #![needs_allocator]
 
-#![deny(rust_2018_idioms)]
-#![allow(explicit_outlives_requirements)]
-
 #![warn(deprecated_in_future)]
-#![warn(intra_doc_link_resolution_failure)]
+#![warn(missing_docs)]
 #![warn(missing_debug_implementations)]
+#![deny(intra_doc_link_resolution_failure)] // rustdoc is run without -D warnings
+
+#![deny(rust_2018_idioms)]
+#![allow(explicit_outlives_requirements)]
 
 #![cfg_attr(not(test), feature(generator_trait))]
 #![cfg_attr(test, feature(test))]
diff --git a/src/liballoc/slice.rs b/src/liballoc/slice.rs
index f4b2d463778..6eac8487401 100644
--- a/src/liballoc/slice.rs
+++ b/src/liballoc/slice.rs
@@ -570,6 +570,16 @@ pub trait SliceConcatExt<T: ?Sized> {
     #[stable(feature = "rename_connect_to_join", since = "1.3.0")]
     fn join(&self, sep: &T) -> Self::Output;
 
+    /// Flattens a slice of `T` into a single value `Self::Output`, placing a
+    /// given separator between each.
+    ///
+    /// # Examples
+    ///
+    /// ```
+    /// # #![allow(deprecated)]
+    /// assert_eq!(["hello", "world"].connect(" "), "hello world");
+    /// assert_eq!([[1, 2], [3, 4]].connect(&0), [1, 2, 0, 3, 4]);
+    /// ```
     #[stable(feature = "rust1", since = "1.0.0")]
     #[rustc_deprecated(since = "1.3.0", reason = "renamed to join")]
     fn connect(&self, sep: &T) -> Self::Output;