about summary refs log tree commit diff
path: root/src/rustllvm/PassWrapper.cpp
diff options
context:
space:
mode:
authorManuel <LifeIsHealthy@icloud.com>2017-03-21 22:18:52 +0100
committerGitHub <noreply@github.com>2017-03-21 22:18:52 +0100
commita8800bb675397e6aa06ffdac46092d5d03e0cf69 (patch)
tree4eb8edbe9d56dbb2302f9126cc429bb165867e22 /src/rustllvm/PassWrapper.cpp
parent58c701f5c7dc26d9b55c631006ece52abe1ddce2 (diff)
downloadrust-a8800bb675397e6aa06ffdac46092d5d03e0cf69.tar.gz
rust-a8800bb675397e6aa06ffdac46092d5d03e0cf69.zip
Fix doc error for ExactSizeIterator
The code example in the trait documentation of ExactSizeIterator
has an incorrect implementation of the len method that does not return
the number of times the example iterator 'Counter' will iterate. This
may confuse readers of the docs as the example code will compile but 
doesn't uphold the trait's contract.

This is easily fixed by modifying the implementation of len and changing
the assert statement to actually assert the correct behaviour. I also
slightly modified a code comment to better reflect what the method 
returns.
Diffstat (limited to 'src/rustllvm/PassWrapper.cpp')
0 files changed, 0 insertions, 0 deletions