We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 5f34c04 commit b363f13Copy full SHA for b363f13
library/core/src/iter/traits/collect.rs
@@ -5,9 +5,9 @@
5
/// collection of some kind.
6
///
7
/// If you want to create a collection from the contents of an iterator, the
8
-/// [`Iterator::collect()`] method is preferred. However, the compiler is
9
-/// sometimes unable to infer the full type of the collection. In these cases,
10
-/// [`FromIterator::from_iter()`] can be more concise and readable. See the
+/// [`Iterator::collect()`] method is preferred. However, when you need to
+/// specify the container type, [`FromIterator::from_iter()`] can be more
+/// readable than using a turbofish (e.g. `::<Vec<_>>()`). See the
11
/// [`Iterator::collect()`] documentation for more examples of its use.
12
13
/// See also: [`IntoIterator`].
0 commit comments