diff options
| author | Ralf Jung <post@ralfj.de> | 2020-05-30 23:09:02 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2020-05-30 23:09:02 +0200 |
| commit | b7f6a0b322dd48d972c3643b19d56232c118a3bf (patch) | |
| tree | 6efafc79f7f16cf4d27df28f6053fd6007271c2e /src/test/ui/iterators/iter-sum-overflow-debug.rs | |
| parent | 356d1e9f4f3a1b86311f17a6e76609a642338279 (diff) | |
| parent | 66e99849389475f1f425512278bfeddb25944deb (diff) | |
| download | rust-b7f6a0b322dd48d972c3643b19d56232c118a3bf.tar.gz rust-b7f6a0b322dd48d972c3643b19d56232c118a3bf.zip | |
Rollup merge of #72773 - Rantanen:is_char_boundary-docs, r=joshtriplett
Fix is_char_boundary documentation Given the "start _and/or end_" wording in the original, the way I understood it was that the `str::is_char_boundary` method would also return `true` for the last byte in a UTF-8 code point sequence. (Which would have meant that for a string consisting of nothing but 1 and 2 byte UTF-8 code point sequences, it would return nothing but `true`.) In practice the method returns `true` only for the starting byte of each sequence and the end of the string: [Playground](https://play.rust-lang.org/?version=nightly&mode=debug&edition=2018&gist=e9f5fc4d6bf2f1bf57a75f3c9a180770) I was also somewhat tempted to remove the _The start and end of the string are considered to be boundaries_, since that's implied by the first sentence, but I decided to avoid bikeshedding over it and left it as it was since it's not wrong in relation to how the method behaves.
Diffstat (limited to 'src/test/ui/iterators/iter-sum-overflow-debug.rs')
0 files changed, 0 insertions, 0 deletions
