about summary refs log tree commit diff
path: root/src/test/run-pass/thinlto
diff options
context:
space:
mode:
authorCorey Farwell <coreyf@rwell.org>2017-02-10 23:41:32 -0500
committerGitHub <noreply@github.com>2017-02-10 23:41:32 -0500
commit17dcc5143844c35640ad675b6f1b42bb22445e8b (patch)
treeeacc966551b4ddbeb983df1d816469cce83cbb60 /src/test/run-pass/thinlto
parent064a0ee131b3129fcad68570975ccc85d0fb54d0 (diff)
parent11d36aec8317dba64e30b98aad75c70e4eed6b3e (diff)
downloadrust-17dcc5143844c35640ad675b6f1b42bb22445e8b.tar.gz
rust-17dcc5143844c35640ad675b6f1b42bb22445e8b.zip
Rollup merge of #39174 - rspeer:iter-nth-doc-fix, r=alexcrichton
Fix a misleading statement in `Iterator.nth()`

The `Iterator.nth()` documentation says "Note that all preceding elements will be consumed". I assumed from that that the preceding elements would be the *only* ones that were consumed, but in fact the returned element is consumed as well.

The way I read the documentation, I assumed that `nth(0)` would not discard anything (there are 0 preceding elements, and maybe it just peeks at the start of the iterator somehow), so I added a sentence clarifying that it does. I also rephrased it to avoid the stunted "i.e." phrasing.
Diffstat (limited to 'src/test/run-pass/thinlto')
0 files changed, 0 insertions, 0 deletions