-
Notifications
You must be signed in to change notification settings - Fork 12.9k
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
Fixes #63797. Change &str -> String in docs. #63865
Conversation
Thanks for the pull request, and welcome! The Rust team is excited to review your changes, and you should hear from @sfackler (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. |
You'll need to add the |
@sfackler Done. Please have look. |
3111d22
to
dadf4b8
Compare
The job Click to expand the log.
I'm a bot! I can only do what humans tell me to, so if this was not helpful or you have suggestions for improvements, please ping or otherwise contact |
The job Click to expand the log.
I'm a bot! I can only do what humans tell me to, so if this was not helpful or you have suggestions for improvements, please ping or otherwise contact |
@@ -480,7 +480,7 @@ impl String { | |||
/// with this error. | |||
/// | |||
/// [`from_utf8_unchecked`]: struct.String.html#method.from_utf8_unchecked | |||
/// [`&str`]: ../../std/primitive.str.html | |||
/// [`String`]: ../../std/string/struct.String.html | |||
/// [`u8`]: ../../std/primitive.u8.html | |||
/// [`Vec<u8>`]: ../../std/vec/struct.Vec.html | |||
/// [`str::from_utf8`]: ../../std/str/fn.from_utf8.html |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Urls here should point to String methods, not to str methods
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hey I am not sure what you are referring to here
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we should also modify this line to point into_bytes
.
Line 487 in fdaf594
/// [`as_bytes`]: struct.String.html#method.as_bytes |
Change occurences of &str to String in src/liballoc/string.rs
fix several issues in String docs - In some places &str was shown instead of String. - into_bytes is the reverse of from_utf8 Fixes rust-lang#63797 I've retaken the work done in this PR: rust-lang#63865 which for some reason was closed. and just done a minor change (I hope you don't mind @sam09 ).
Change occurences of &str to String in src/liballoc/string.rs. Fixes #63797.