Skip to content
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

Adjust documentation links for slice::make_ascii_*case #83577

Merged
merged 3 commits into from
Mar 28, 2021

Conversation

geeklint
Copy link
Contributor

The documentation for the functions slice::to_ascii_lowercase and slice::to_ascii_uppercase contain the suggestion

To lowercase the value in-place, use make_ascii_lowercase

however the link to the suggested method takes you to the page for u8, rather than the method of that name on the same page.

@rust-highfive
Copy link
Collaborator

Thanks for the pull request, and welcome! The Rust team is excited to review your changes, and you should hear from @m-ou-se (or someone else) soon.

If any changes to this PR are deemed necessary, please add them as extra commits. This ensures that the reviewer can see what has changed since they last reviewed the code. Due to the way GitHub handles out-of-date commits, this should also make it reasonably obvious what issues have or haven't been addressed. Large or tricky changes may require several passes of review and changes.

Please see the contribution instructions for more information.

@rust-highfive rust-highfive added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Mar 27, 2021
@m-ou-se
Copy link
Member

m-ou-se commented Mar 27, 2021

Thanks!

Can you make the links use slice:: instead of #method.? Then rustdoc will be able to verify them.

@geeklint
Copy link
Contributor Author

Thanks!

Can you make the links use slice:: instead of #method.? Then rustdoc will be able to verify them.

Sure! I was just mirroring the inverse docs (e.g. the docs of make_ascii_lowercase). Does it make sense to also change those to slice:: ?

@m-ou-se
Copy link
Member

m-ou-se commented Mar 27, 2021

Ah yes. This feature of rustdoc is relatively new, and we haven't applied it everywhere in the standard library yet. So if you see any, feel free to update them. (See also #75080, which was tracking the progress on that.)

@rust-log-analyzer

This comment has been minimized.

@m-ou-se
Copy link
Member

m-ou-se commented Mar 27, 2021

Oh, slice::to_ascii_uppercase does not work from the make_ascii_uppercase documentation, since the latter is defined in core and always available, and the former is only available in alloc and std. Sorry about that.

@geeklint
Copy link
Contributor Author

Okay, so I should put the ones in core back to #method.?

@m-ou-se
Copy link
Member

m-ou-se commented Mar 27, 2021

Okay, so I should put the ones in core back to #method.?

Yes, let's do that for now.

@jyn514 Do you think rustdoc should handle this? We don't have a lot of types to which we add methods in both core and alloc/std, so it might not be worth it.

@m-ou-se
Copy link
Member

m-ou-se commented Mar 27, 2021

Thanks! And congrats on your first contribution to the Rust standard library ^^

@bors r+ rollup

@bors
Copy link
Contributor

bors commented Mar 27, 2021

📌 Commit 0a30c5b has been approved by m-ou-se

@bors bors added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Mar 27, 2021
@jyn514
Copy link
Member

jyn514 commented Mar 27, 2021

Oh, slice::to_ascii_uppercase does not work from the make_ascii_uppercase documentation, since the latter is defined in core and always available, and the former is only available in alloc and std. Sorry about that.

@jyn514 Do you think rustdoc should handle this? We don't have a lot of types to which we add methods in both core and alloc/std, so it might not be worth it.

This is a very large can of worms - I would like it to work, but it's hard. #74481

@bors
Copy link
Contributor

bors commented Mar 28, 2021

⌛ Testing commit 0a30c5b with merge d4c96de...

@bors
Copy link
Contributor

bors commented Mar 28, 2021

☀️ Test successful - checks-actions
Approved by: m-ou-se
Pushing d4c96de to master...

@bors bors added the merged-by-bors This PR was explicitly merged by bors. label Mar 28, 2021
@bors bors merged commit d4c96de into rust-lang:master Mar 28, 2021
@rustbot rustbot added this to the 1.53.0 milestone Mar 28, 2021
@geeklint geeklint deleted the slice_to_ascii_case_doc_links branch March 28, 2021 20:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
merged-by-bors This PR was explicitly merged by bors. S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants