Skip to content

Expand {Path,OsStr}::{to_str,to_string_lossy} doc examples. - #38839

Merged
bors merged 1 commit into
rust-lang:masterfrom
frewsxcv:osstr-to-str
Jan 10, 2017
Merged

Expand {Path,OsStr}::{to_str,to_string_lossy} doc examples.#38839
bors merged 1 commit into
rust-lang:masterfrom
frewsxcv:osstr-to-str

Conversation

@frewsxcv

Copy link
Copy Markdown
Contributor

No description provided.

Comment threadsrc/libstd/ffi/os_str.rs Outdated

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Isn't this Undefined Behaviour?

Copy link
Copy Markdown
ContributorAuthor

Choose a reason for hiding this comment

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

Is it still UB if it doesn't get represented as a string?

@strega-nil

Copy link
Copy Markdown
Contributor

Please no :(

@frewsxcv

Copy link
Copy Markdown
ContributorAuthor

Please no :(

In retrospect, I agree. I overlooked that what I am doing is UB.

@frewsxcv

Copy link
Copy Markdown
ContributorAuthor

Let me know if the latest changes look better.

@strega-nil

Copy link
Copy Markdown
Contributor

Much nicer :)

@frewsxcv

Copy link
Copy Markdown
ContributorAuthor

Squashed.

@GuillaumeGomez

Copy link
Copy Markdown
Member

Good for me as well. Thanks for the review @ubsan! ;)

@bors: r+ rollup

@bors

bors commented Jan 5, 2017

Copy link
Copy Markdown
Collaborator

📌 Commit 4794f95 has been approved by GuillaumeGomez

@frewsxcvfrewsxcv mentioned this pull request Jan 9, 2017
sanxiyn added a commit to sanxiyn/rust that referenced this pull request Jan 10, 2017
…omez
Expand {Path,OsStr}::{to_str,to_string_lossy} doc examples.
None
@sanxiynsanxiyn mentioned this pull request Jan 10, 2017
bors added a commit that referenced this pull request Jan 10, 2017
Rollup of 11 pull requests
- Successful merges: #38606, #38607, #38623, #38664, #38799, #38816, #38836, #38839, #38841, #38849, #38874
- Failed merges: #38845
@bors
bors merged commit 4794f95 into rust-lang:masterJan 10, 2017
@frewsxcv
frewsxcv deleted the osstr-to-str branch June 19, 2017 14:56
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants

@frewsxcv@strega-nil@GuillaumeGomez@bors@ollie27