diff options
| author | Matthias Krüger <matthias.krueger@famsik.de> | 2024-09-25 20:11:00 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2024-09-25 20:11:00 +0200 |
| commit | 3b2580914b3f5d9599dbb9b3ed4a683d4e52f1ea (patch) | |
| tree | cd645dd34608662444c49419286cadd7d2b9cc87 /library/std/src/sys/pal/unix/stack_overflow.rs | |
| parent | 3ee3e063c1139fb19d1019a0366404e41a14a359 (diff) | |
| parent | b466fa6db8db80bad78c8e4b2f7516525c493a6c (diff) | |
| download | rust-3b2580914b3f5d9599dbb9b3ed4a683d4e52f1ea.tar.gz rust-3b2580914b3f5d9599dbb9b3ed4a683d4e52f1ea.zip | |
Rollup merge of #130819 - bjoernager:char-must-use-len-utf, r=Noratrieb
Add `must_use` attribute to `len_utf8` and `len_utf16`. The `len_utf8` and `len_utf16` methods in `char` should have the `must_use` attribute. The somewhat similar method `<[T]>::len` has had this attribute since #95274. Considering that these two methods would most likely be used to test the size of a buffer (before a call to `encode_utf8` or `encode_utf16`), *not* using their return values could indicate a bug. According to ["When to add `#[must_use]`](https://std-dev-guide.rust-lang.org/policy/must-use.html), this is **not** considered a breaking change (and could be reverted again at a later time).
Diffstat (limited to 'library/std/src/sys/pal/unix/stack_overflow.rs')
0 files changed, 0 insertions, 0 deletions
