about summary refs log tree commit diff
diff options
context:
space:
mode:
authorDylan DPC <dylan.dpc@gmail.com>2021-02-09 02:39:51 +0100
committerGitHub <noreply@github.com>2021-02-09 02:39:51 +0100
commit52bc54efff7b9b08310201585b50d5a60b499efd (patch)
tree528293ca6e4daaaa58aefb69043669155524d1cc
parent44e526b2c38c81c732dd3e640f3cc06acc8f69bb (diff)
parent35450365ac2fda8b948fe6fd1a1123837a9554b0 (diff)
downloadrust-52bc54efff7b9b08310201585b50d5a60b499efd.tar.gz
rust-52bc54efff7b9b08310201585b50d5a60b499efd.zip
Rollup merge of #81697 - xfix:every-doc-alias, r=Mark-Simulacrum
Add "every" as a doc alias for "all".

This matches [Array#every](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/every) in JavaScript.

Oddly enough, `core::iter::Iterator::all` appears twice. This appears to be a rustdoc bug which I decided to fill in as #81696.

![image](https://user-images.githubusercontent.com/1297598/106717890-94f43e80-6600-11eb-9428-2cd425823df9.png)
-rw-r--r--library/core/src/iter/traits/iterator.rs1
1 files changed, 1 insertions, 0 deletions
diff --git a/library/core/src/iter/traits/iterator.rs b/library/core/src/iter/traits/iterator.rs
index 6b42d456205..5faa4b82560 100644
--- a/library/core/src/iter/traits/iterator.rs
+++ b/library/core/src/iter/traits/iterator.rs
@@ -2205,6 +2205,7 @@ pub trait Iterator {
     /// // we can still use `iter`, as there are more elements.
     /// assert_eq!(iter.next(), Some(&3));
     /// ```
+    #[doc(alias = "every")]
     #[inline]
     #[stable(feature = "rust1", since = "1.0.0")]
     fn all<F>(&mut self, f: F) -> bool