-
Notifications
You must be signed in to change notification settings - Fork 12.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
add #[must_use] to functions of slice and its iterators. #95274
Conversation
r? @Dylan-DPC |
@bors r+ |
📌 Commit dcdde01 has been approved by |
add #[must_use] to functions of slice and its iterators. Continuation of rust-lang#92853. Tracking issue: rust-lang#89692.
@bors r+ |
📌 Commit 5f88c23 has been approved by |
⌛ Testing commit 5f88c23 with merge 78da86cb08fc3f52a17628bda3d9992d837234e7... |
💔 Test failed - checks-actions |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
Spurios 403 from crates.io ( @bors retry |
@jendrikw: 🔑 Insufficient privileges: not in try users |
This permission model seems kind of flawed when I can bypass it just by pushing an empty commit... |
@bors treeclosed=100 |
@bors retry |
@bors p=101 |
Note: I have seen a 403 today myself. The error is spurious and will most likely go away after a retry. |
@nagisa several prs have been failing with the same problem from last 1-2 hours |
☀️ Test successful - checks-actions |
Finished benchmarking commit (1d9c262): comparison url. Summary: This benchmark run did not return any relevant results. 4 results were found to be statistically significant but too small to be relevant. If you disagree with this performance assessment, please file an issue in rust-lang/rustc-perf. @rustbot label: -perf-regression |
add #[must_use] to functions of slice and its iterators. Continuation of rust-lang#92853. Tracking issue: rust-lang#89692.
…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 rust-lang#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).
Rollup merge of rust-lang#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 rust-lang#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).
Continuation of #92853.
Tracking issue: #89692.