Skip to content

Commit

Permalink
Auto merge of rust-lang#127728 - matthiaskrgr:rollup-ercdbjd, r=matth…
Browse files Browse the repository at this point in the history
…iaskrgr

Rollup of 5 pull requests

Successful merges:

 - rust-lang#127273 (Fix `DebugParser`.)
 - rust-lang#127587 (Report usage of lib features in ast validation)
 - rust-lang#127592 (doc: Suggest `str::repeat` over `iter::repeat().take().collect()`)
 - rust-lang#127630 (Remove lang feature for type ascription (since it's a lib feature now))
 - rust-lang#127711 (Add regression test for a gce + effects ICE)

r? `@ghost`
`@rustbot` modify labels: rollup
  • Loading branch information
bors committed Jul 14, 2024
2 parents 7cd8086 + 6c4029a commit 3492a6b
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions core/src/iter/sources/repeat.rs
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,15 @@ use crate::num::NonZero;
/// Infinite iterators like `repeat()` are often used with adapters like
/// [`Iterator::take()`], in order to make them finite.
///
/// Use [`str::repeat()`] instead of this function if you just want to repeat
/// a char/string `n`th times.
///
/// If the element type of the iterator you need does not implement `Clone`,
/// or if you do not want to keep the repeated element in memory, you can
/// instead use the [`repeat_with()`] function.
///
/// [`repeat_with()`]: crate::iter::repeat_with
/// [`str::repeat()`]: ../../std/primitive.str.html#method.repeat
///
/// # Examples
///
Expand Down

0 comments on commit 3492a6b

Please sign in to comment.