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

std: Stabilize FromStr and parse #21718

Merged
merged 1 commit into from
Jan 31, 2015

Conversation

alexcrichton
Copy link
Member

This commits adds an associated type to the FromStr trait representing an
error payload for parses which do not succeed. The previous return value,
Option<Self> did not allow for this form of payload. After the associated type
was added, the following attributes were applied:

  • FromStr is now stable
  • FromStr::Err is now stable
  • FromStr::from_str is now stable
  • StrExt::parse is now stable
  • FromStr for bool is now stable
  • FromStr for $float is now stable
  • FromStr for $integral is now stable
  • Errors returned from stable FromStr implementations are stable
  • Errors implement Display and Error (both impl blocks being #[stable])

Closes #15138

@alexcrichton
Copy link
Member Author

r? @aturon

@rust-highfive rust-highfive assigned aturon and unassigned huonw Jan 28, 2015
@rust-highfive
Copy link
Collaborator

r? @huonw

(rust_highfive has picked a reviewer for you, use r? to override)

@aturon aturon mentioned this pull request Jan 28, 2015
38 tasks
@alexcrichton alexcrichton force-pushed the stabilize-from-str branch 3 times, most recently from 0e52a3b to e17518f Compare January 30, 2015 02:32
@aturon
Copy link
Member

aturon commented Jan 30, 2015

@bors: r+ e17518f

@alexcrichton alexcrichton force-pushed the stabilize-from-str branch 4 times, most recently from 7f2f201 to 79b79b5 Compare January 30, 2015 16:51
This commits adds an associated type to the `FromStr` trait representing an
error payload for parses which do not succeed. The previous return value,
`Option<Self>` did not allow for this form of payload. After the associated type
was added, the following attributes were applied:

* `FromStr` is now stable
* `FromStr::Err` is now stable
* `FromStr::from_str` is now stable
* `StrExt::parse` is now stable
* `FromStr for bool` is now stable
* `FromStr for $float` is now stable
* `FromStr for $integral` is now stable
* Errors returned from stable `FromStr` implementations are stable
* Errors implement `Display` and `Error` (both impl blocks being `#[stable]`)

Closes rust-lang#15138
@alexcrichton
Copy link
Member Author

@bors: r=aturon 0cdde6e

alexcrichton added a commit to alexcrichton/rust that referenced this pull request Jan 30, 2015
This commits adds an associated type to the `FromStr` trait representing an
error payload for parses which do not succeed. The previous return value,
`Option<Self>` did not allow for this form of payload. After the associated type
was added, the following attributes were applied:

* `FromStr` is now stable
* `FromStr::Err` is now stable
* `FromStr::from_str` is now stable
* `StrExt::parse` is now stable
* `FromStr for bool` is now stable
* `FromStr for $float` is now stable
* `FromStr for $integral` is now stable
* Errors returned from stable `FromStr` implementations are stable
* Errors implement `Display` and `Error` (both impl blocks being `#[stable]`)

Closes rust-lang#15138
@alexcrichton alexcrichton merged commit 0cdde6e into rust-lang:master Jan 31, 2015
@alexcrichton alexcrichton deleted the stabilize-from-str branch January 31, 2015 07:28
alexcrichton added a commit to alexcrichton/rust that referenced this pull request Feb 4, 2015
bors added a commit that referenced this pull request Feb 10, 2015
These were forgotten reexports from #21718

Closes #21929
Sign up for free to 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.

Consider using Result for FromStr, FromStrRadix and friends
4 participants