Skip to content

Improve documentation for Vec::as_slice #25622

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

Closed
mbrubeck opened this issue May 19, 2015 · 5 comments · Fixed by #25838
Closed

Improve documentation for Vec::as_slice #25622

mbrubeck opened this issue May 19, 2015 · 5 comments · Fixed by #25838

Comments

@mbrubeck
Copy link
Contributor

Vec::as_slice and Vec::as_mut_slice are both marked unstable with reason "waiting on RFC revision." But the docs for as_mut_slice say that it is deprecated.

If these methods are deprecated, they should be marked deprecated instead of unstable. And either way, a hint should be added regarding how to replace Vec::as_slice in old code.

[moved from rust-lang/rfcs#1128]

@mbrubeck
Copy link
Contributor Author

cc @bluss

@Aatch Aatch added the A-docs label May 20, 2015
steveklabnik added a commit to steveklabnik/rust that referenced this issue May 27, 2015
Slicing syntax should be used instead.

Fixes rust-lang#25622
@steveklabnik
Copy link
Member

See #25833 (comment) , this is actually correct

@mbrubeck
Copy link
Contributor Author

There are still these problems to be fixed:

  • as_mut_slice docs say it is deprecated, when it isn't.
  • as_slice docs don't point to the stable alternative &v[..].

@steveklabnik
Copy link
Member

as_mut_slice docs say it is deprecated, when it isn't.

Which are these? It shows as unstable in that patch I worked up

@steveklabnik
Copy link
Member

ahhh i see, it's in the words, not the attribute

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
3 participants