-
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
Unchecked indexing/slicing methods should point towards their safe counterparts #39911
Comments
cc @rust-lang/docs, this feels like an E-easy issue to me, tagging as such -- we should add the links to the unchecked method documentations pointing to safe indexing ( |
@Mark-Simulacrum: Yep, all good. |
If no-one picks it up until then I'll try to get this done over the weekend. |
@citizen428: Sure, go ahead. |
…slicing, r=GuillaumeGomez Update documentation for indexing/slicing methods See rust-lang#39911 r? @steveklabnik
…slicing, r=GuillaumeGomez Update documentation for indexing/slicing methods See rust-lang#39911 r? @steveklabnik
This has been merged, so the issue should be closed. |
The following unsafe unchecked indexing / slicing methods don't refer to the safe alternatives at all, misleading newbies into thinking that they are the preferred way of performing that operation. There should be a big disclaimer stating what their checked counterparts are and that they are preferred.
str::slice_unchecked
/str::slice_mut_unchecked
[T]::get_unchecked
/[T]::get_unchecked_mut
The text was updated successfully, but these errors were encountered: