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

add FromStr Impl for char #42271

Merged
merged 1 commit into from
Jun 21, 2017
Merged

add FromStr Impl for char #42271

merged 1 commit into from
Jun 21, 2017

Conversation

tinaun
Copy link
Contributor

@tinaun tinaun commented May 27, 2017

fixes #24939.

is it possible to use pub(restricted) instead of using a stability attribute for the internal error representation? is it needed at all?

@tinaun tinaun force-pushed the charfromstr branch 2 times, most recently from 3af38df to 13c89a9 Compare May 28, 2017 02:39
@Mark-Simulacrum Mark-Simulacrum added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label May 28, 2017
@frewsxcv frewsxcv added the T-libs-api Relevant to the library API team, which will review and decide on the PR/issue. label May 28, 2017
@alexcrichton
Copy link
Member

This looks pretty reasonable to me, thanks for the PR @tinaun! I'll...

@rfcbot fcp merge

@alexcrichton
Copy link
Member

is it possible to use pub(restricted) instead of using a stability attribute for the internal error representation? is it needed at all?

Currently the way to work across crates is stability attributes, so this is ok. If we decide to land this though the FromStr for char impl block will be "insta stable" in the sense that the #[unstable] attribute is basically ignored. Could you change that and the error type as well to #[stable], along with the impls on the error type itself?

@rfcbot
Copy link

rfcbot commented May 30, 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.

@BurntSushi
Copy link
Member

If we stabilize the impl then we should also stabilize the error type?

@alexcrichton
Copy link
Member

That's what I'm thinking, yeah.

@alexcrichton
Copy link
Member

Changes look good to me, thanks @tinaun!

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

rfcbot commented Jun 6, 2017

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

@Mark-Simulacrum
Copy link
Member

@alexcrichton I think this is good to go, but I'm not sure if I understand the rfcbot process on PRs 100% so not going to r=you myself.


/// An error which can be returned when parsing a char.
#[stable(feature = "char_from_str", since = "1.19.0")]
#[derive(Copy, Clone, Debug, PartialEq, Eq)]
Copy link
Member

Choose a reason for hiding this comment

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

To be conservative, could this remove Copy, PartialEq, and Eq?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

sure

@alexcrichton
Copy link
Member

Ah no worries @Mark-Simulacrum. @tinaun I added one minor comment about the error type but otherwise this should be good to go.

@alexcrichton
Copy link
Member

@tinaun oh it's ok to leave Clone I'd just remove Copy, basically I'd just have #[derive(Debug, Clone)]

@tinaun
Copy link
Contributor Author

tinaun commented Jun 14, 2017

whoops, totally thought i removed copy

@alexcrichton
Copy link
Member

Ah it looks like some of the tests are failing with the removal of PartialEq, want to add some unwrap() annotations to get them compiling again?

@rfcbot
Copy link

rfcbot commented Jun 16, 2017

The final comment period is now complete.

@tinaun
Copy link
Contributor Author

tinaun commented Jun 20, 2017

fixed; squashed.

@alexcrichton
Copy link
Member

@bors: r+

Thanks!

@bors
Copy link
Contributor

bors commented Jun 20, 2017

📌 Commit fd9d7aa has been approved by alexcrichton

@Mark-Simulacrum
Copy link
Member

@bors rollup

@arielb1 arielb1 added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. and removed final-comment-period In the final comment period and will be merged soon unless new substantive objections are raised. S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Jun 20, 2017
frewsxcv added a commit to frewsxcv/rust that referenced this pull request Jun 20, 2017
add `FromStr` Impl for `char`

fixes rust-lang#24939.

is it possible to use pub(restricted) instead of using a stability attribute for the internal error representation? is it needed at all?
bors added a commit that referenced this pull request Jun 20, 2017
Rollup of 6 pull requests

- Successful merges: #42271, #42717, #42728, #42749, #42756, #42772
- Failed merges:
@bors bors merged commit fd9d7aa into rust-lang:master Jun 21, 2017
@tinaun tinaun deleted the charfromstr branch June 21, 2017 01:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. 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.

FromStr is not implemented for char
8 participants