From cdf1d368e2376a94fc433fedc63171ed9e050289 Mon Sep 17 00:00:00 2001 From: Ralf Jung Date: Sun, 14 Apr 2019 10:00:09 +0200 Subject: [PATCH 1/3] bump stdsimd; make intra_doc_link_resolution_failure an error again --- src/liballoc/lib.rs | 2 +- src/libcore/lib.rs | 2 +- src/stdsimd | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/liballoc/lib.rs b/src/liballoc/lib.rs index 7f3acc933d413..41e22d84699e7 100644 --- a/src/liballoc/lib.rs +++ b/src/liballoc/lib.rs @@ -62,8 +62,8 @@ #![allow(explicit_outlives_requirements)] #![warn(deprecated_in_future)] -#![warn(intra_doc_link_resolution_failure)] #![warn(missing_debug_implementations)] +#![deny(intra_doc_link_resolution_failure)] // rustdoc is run without -D warnings #![cfg_attr(not(test), feature(generator_trait))] #![cfg_attr(test, feature(test))] diff --git a/src/libcore/lib.rs b/src/libcore/lib.rs index 63688e70c45cb..615549f47bbd6 100644 --- a/src/libcore/lib.rs +++ b/src/libcore/lib.rs @@ -60,8 +60,8 @@ #![warn(deprecated_in_future)] #![warn(missing_docs)] -#![warn(intra_doc_link_resolution_failure)] #![warn(missing_debug_implementations)] +#![deny(intra_doc_link_resolution_failure)] // rustdoc is run without -D warnings #![feature(allow_internal_unstable)] #![feature(arbitrary_self_types)] diff --git a/src/stdsimd b/src/stdsimd index 2792b45c97588..2323a858f060a 160000 --- a/src/stdsimd +++ b/src/stdsimd @@ -1 +1 @@ -Subproject commit 2792b45c975880038240d477adb0d66f760ac048 +Subproject commit 2323a858f060a0d2a39786a619885608017d538f From 8ef7ca130271369400719c712369c33a30d6528b Mon Sep 17 00:00:00 2001 From: Ralf Jung Date: Sun, 14 Apr 2019 10:16:23 +0200 Subject: [PATCH 2/3] make lint levels more consistent --- src/liballoc/lib.rs | 6 +++--- src/libstd/lib.rs | 7 ++++--- 2 files changed, 7 insertions(+), 6 deletions(-) diff --git a/src/liballoc/lib.rs b/src/liballoc/lib.rs index 41e22d84699e7..d8d61c673af38 100644 --- a/src/liballoc/lib.rs +++ b/src/liballoc/lib.rs @@ -58,13 +58,13 @@ #![no_std] #![needs_allocator] -#![deny(rust_2018_idioms)] -#![allow(explicit_outlives_requirements)] - #![warn(deprecated_in_future)] #![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/libstd/lib.rs b/src/libstd/lib.rs index ee6ba3f438f15..62bc1991cc93c 100644 --- a/src/libstd/lib.rs +++ b/src/libstd/lib.rs @@ -205,9 +205,10 @@ // Don't link to std. We are std. #![no_std] -#![deny(missing_docs)] -#![deny(intra_doc_link_resolution_failure)] -#![deny(missing_debug_implementations)] +//#![warn(deprecated_in_future)] // FIXME: std still has quite a few uses of `mem::uninitialized` +#![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)] From 50c615baa2c09694f0ba446c53777e98db88ed01 Mon Sep 17 00:00:00 2001 From: Ralf Jung Date: Mon, 15 Apr 2019 16:34:08 +0200 Subject: [PATCH 3/3] warn(missing_docs) in liballoc, and add missing docs --- src/liballoc/borrow.rs | 1 + src/liballoc/boxed.rs | 1 + src/liballoc/lib.rs | 1 + src/liballoc/slice.rs | 10 ++++++++++ 4 files changed, 13 insertions(+) diff --git a/src/liballoc/borrow.rs b/src/liballoc/borrow.rs index ee1799fad8e15..d5e15b3719c2e 100644 --- a/src/liballoc/borrow.rs +++ b/src/liballoc/borrow.rs @@ -32,6 +32,7 @@ impl<'a, B: ?Sized> Borrow 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; diff --git a/src/liballoc/boxed.rs b/src/liballoc/boxed.rs index 6a6a9146e2432..8a3950718d7d2 100644 --- a/src/liballoc/boxed.rs +++ b/src/liballoc/boxed.rs @@ -760,6 +760,7 @@ impl + ?Sized> Fn for Box { #[unstable(feature = "fnbox", reason = "will be deprecated if and when `Box` becomes usable", issue = "28796")] pub trait FnBox: FnOnce { + /// Performs the call operation. fn call_box(self: Box, args: A) -> Self::Output; } diff --git a/src/liballoc/lib.rs b/src/liballoc/lib.rs index d8d61c673af38..63b3fbbdaefe1 100644 --- a/src/liballoc/lib.rs +++ b/src/liballoc/lib.rs @@ -59,6 +59,7 @@ #![needs_allocator] #![warn(deprecated_in_future)] +#![warn(missing_docs)] #![warn(missing_debug_implementations)] #![deny(intra_doc_link_resolution_failure)] // rustdoc is run without -D warnings diff --git a/src/liballoc/slice.rs b/src/liballoc/slice.rs index f4b2d463778a9..6eac848740106 100644 --- a/src/liballoc/slice.rs +++ b/src/liballoc/slice.rs @@ -570,6 +570,16 @@ pub trait SliceConcatExt { #[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;