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

added Error and Display impl for std::ffi::FromBytesWithNulError #39960

Merged
merged 2 commits into from
Mar 1, 2017
Merged

added Error and Display impl for std::ffi::FromBytesWithNulError #39960

merged 2 commits into from
Mar 1, 2017

Conversation

chordowl
Copy link
Contributor

Fixes #39925.

This is my first PR, so I wasn't quite sure about the stability annotation.

@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 @BurntSushi (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.

@frewsxcv frewsxcv added the T-libs-api Relevant to the library API team, which will review and decide on the PR/issue. label Feb 19, 2017
@@ -455,6 +455,20 @@ impl From<NulError> for io::Error {
}
}

#[unstable(feature = "frombyteswithnulerror_impls", reason = "recently added", issue = "39925")]
Copy link
Member

Choose a reason for hiding this comment

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

Oh unfortunately impls aren't subject to stability the same way as other parts of the standard library, so these'll be "insta-stable" so it's ok to just go ahead and tag this with #[stable]

@alexcrichton
Copy link
Member

Looks good to me, thanks @lukaramu!

@rfcbot fcp merge

@rfcbot
Copy link

rfcbot commented Feb 21, 2017

Team member @alexcrichton has proposed to merge this. The next step is review by the rest of the tagged teams:

No concerns currently listed.

Once these reviewers reach consensus, this will enter its final comment period. If you spot a major issue that hasn't been raised at any point in this process, please speak up!

See this document for info about what commands tagged team members can give me.

Sorry, something went wrong.

Changed stability annotations for the new Error and Display impls
for std::ffi::FromBytesWithNulError as they aren't subject to
stability the same way.
#[unstable(feature = "frombyteswithnulerror_impls", reason = "recently added", issue = "39925")]
impl Error for FromBytesWithNulError {
fn description(&self) -> &str {
"data provided is not null terminated or contains an interior nul byte"
Copy link
Contributor

Choose a reason for hiding this comment

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

Shouldn't it be interior null byte?

Copy link
Contributor

@codyps codyps Feb 24, 2017

Choose a reason for hiding this comment

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

Not necessarily. https://en.wikipedia.org/wiki/Null_character

Also note the name of the error type.

Copy link
Contributor

Choose a reason for hiding this comment

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

Ah I see, thanks for the correction @jmesmon

@rfcbot
Copy link

rfcbot commented Feb 28, 2017

🔔 This is now entering its final comment period, as per the review above. 🔔

@rfcbot rfcbot added the final-comment-period In the final comment period and will be merged soon unless new substantive objections are raised. label Feb 28, 2017
@alexcrichton
Copy link
Member

@bors: r+

@bors
Copy link
Contributor

bors commented Feb 28, 2017

📌 Commit 48331ef has been approved by alexcrichton

frewsxcv added a commit to frewsxcv/rust that referenced this pull request Mar 1, 2017
added Error and Display impl for std::ffi::FromBytesWithNulError

Fixes rust-lang#39925.

This is my first PR, so I wasn't quite sure about the stability annotation.
bors added a commit that referenced this pull request Mar 1, 2017
Rollup of 6 pull requests

- Successful merges: #39419, #39936, #39944, #39960, #40028, #40128
- Failed merges:
bors added a commit that referenced this pull request Mar 1, 2017
Rollup of 6 pull requests

- Successful merges: #39419, #39936, #39944, #39960, #40028, #40128
- Failed merges:
@bors bors merged commit 48331ef into rust-lang:master Mar 1, 2017
@chordowl chordowl deleted the issue-39925 branch March 1, 2017 12:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
final-comment-period In the final comment period and will be merged soon unless new substantive objections are raised. T-libs-api Relevant to the library API team, which will review and decide on the PR/issue.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

9 participants