Document From trait implementations for OsStr, OsString, CString, and CStr by cypher · Pull Request #52340 · rust-lang/rust (original) (raw)

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 andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Conversation11 Commits3 Checks0 Files changed

Conversation

This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.Learn more about bidirectional Unicode characters

[ Show hidden characters]({{ revealButtonHref }})

cypher

@rust-highfive

Thanks for the pull request, and welcome! The Rust team is excited to review your changes, and you should hear from @steveklabnik (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

The job x86_64-gnu-llvm-5.0 of your PR failed on Travis (raw log). Through arcane magic we have determined that the following fragments from the build log may contain information about the problem.

Click to expand the log.

[01:19:33] travis_fold🔚stage0-linkchecker

[01:19:33] travis_time🔚stage0-linkchecker:start=1531484156982743671,finish=1531484159599167196,duration=2616423525

[01:19:36] std/io/struct.Error.html:190: broken link - std/io/struct.NulError.html
[01:19:37] std/sync/struct.Arc.html:399: broken link - std/sync/struct.CString.html
[01:19:37] std/sync/struct.Arc.html:401: broken link - std/sync/struct.OsString.html
[01:19:39] std/boxed/struct.Box.html:297: broken link - std/boxed/struct.CString.html
[01:19:39] std/boxed/struct.Box.html:300: broken link - std/boxed/struct.CString.html
[01:19:39] std/boxed/struct.Box.html:304: broken link - std/boxed/struct.OsString.html
[01:19:42] std/rc/struct.Rc.html:289: broken link - std/rc/struct.CString.html
[01:19:42] std/rc/struct.Rc.html:291: broken link - std/rc/struct.OsString.html
[01:19:42] std/vec/struct.Vec.html:1931: broken link - std/vec/struct.CString.html
[01:19:42] std/vec/struct.Vec.html:1932: broken link - std/vec/struct.CString.html
[01:19:54] thread 'main' panicked at 'found some broken links', tools/linkchecker/main.rs:49:9
[01:19:54] 
[01:19:54] 
[01:19:54] command did not execute successfully: "/checkout/obj/build/x86_64-unknown-linux-gnu/stage0-tools-bin/linkchecker" "/checkout/obj/build/x86_64-unknown-linux-gnu/doc"
[01:19:54] expected success, got: exit code: 101
[01:19:54] expected success, got: exit code: 101
[01:19:54] 
[01:19:54] 
[01:19:54] failed to run: /checkout/obj/build/bootstrap/debug/bootstrap test
[01:19:54] Build completed unsuccessfully in 0:32:39
[01:19:54] make: *** [check] Error 1
[01:19:54] Makefile:58: recipe for target 'check' failed

The command "stamp sh -x -c "$RUN_SCRIPT"" exited with 2.
travis_time:start:063e39b7
$ date && (curl -fs --head https://google.com | grep ^Date: | sed 's/Date: //g' || true)

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 @TimNN. (Feature Requests)

@cypher

@cypher

@cypher

Fixed a few broken links, and rebased against current master.

@stokhos

Ping from triage! @steveklabnik will you have time to review this PR?

steveklabnik

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

One tiny tweak and then this is good to go! Thanks a ton :)

@@ -642,6 +642,11 @@ impl fmt::Debug for CString {
#[stable(feature = "cstring_into", since = "1.7.0")]
impl From for Vec {
/// Converts a [`CString`] into a [`Vec`]``.
/// The conversion consumes the [`CString`], and removes the terminating NUL byte.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You need a blank /// above this line to separate the summary from the rest of the content

@@ -348,6 +348,11 @@ impl OsString {
#[stable(feature = "rust1", since = "1.0.0")]
impl From for OsString {
/// Converts a [`String`] into a [`OsString`].
/// The conversion copies the data, and includes an allocation on the heap.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

same here

@cypher

@cypher

@pietroalbini

@steveklabnik

@bors

📌 Commit ed5edcb has been approved by steveklabnik

@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

Jul 30, 2018

Mark-Simulacrum added a commit to Mark-Simulacrum/rust that referenced this pull request

Jul 30, 2018

@Mark-Simulacrum

…r=steveklabnik

Document From trait implementations for OsStr, OsString, CString, and CStr

As part of issue rust-lang#51430 (cc @skade).

The allocation and copy claims should be double-checked.

r? @steveklabnik

GuillaumeGomez added a commit to GuillaumeGomez/rust that referenced this pull request

Jul 31, 2018

@GuillaumeGomez

…r=steveklabnik

Document From trait implementations for OsStr, OsString, CString, and CStr

As part of issue rust-lang#51430 (cc @skade).

The allocation and copy claims should be double-checked.

r? @steveklabnik

Mark-Simulacrum added a commit to Mark-Simulacrum/rust that referenced this pull request

Aug 1, 2018

@Mark-Simulacrum

…r=steveklabnik

Document From trait implementations for OsStr, OsString, CString, and CStr

As part of issue rust-lang#51430 (cc @skade).

The allocation and copy claims should be double-checked.

r? @steveklabnik

bors added a commit that referenced this pull request

Aug 1, 2018

@bors

Rollup of 31 pull requests

Successful merges:

Failed merges:

r? @ghost

pietroalbini added a commit to pietroalbini/rust that referenced this pull request

Aug 1, 2018

@pietroalbini

…r=steveklabnik

Document From trait implementations for OsStr, OsString, CString, and CStr

As part of issue rust-lang#51430 (cc @skade).

The allocation and copy claims should be double-checked.

r? @steveklabnik

bors added a commit that referenced this pull request

Aug 1, 2018

@bors

Rollup of 30 pull requests

Successful merges:

Failed merges:

r? @ghost

@cypher cypher deleted the document-from-trait-in-ffi branch

August 1, 2018 11:17

Labels

S-waiting-on-bors

Status: Waiting on bors to run and complete tests. Bors will change the label on completion.