-
Notifications
You must be signed in to change notification settings - Fork 13.4k
Should Option::expect be parameterized over Any + Send? #14008
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Comments
alexcrichton
added a commit
to alexcrichton/rust
that referenced
this issue
May 7, 2014
See rust-lang#14008 for more details
+1 for taking &str and nuking the extension trait. |
alexcrichton
added a commit
to alexcrichton/rust
that referenced
this issue
Jun 4, 2014
This commit removes the <M: Any + Send> type parameter from Option::expect in favor of just taking a hard-coded `&str` argument. This allows this function to move into libcore. Previous code using strings with `expect` will continue to work, but code using this implicitly to transmit task failure will need to unwrap manually with a `match` statement. [breaking-change] Closes rust-lang#14008
bors
added a commit
that referenced
this issue
Jun 5, 2014
This commit removes the <M: Any + Send> type parameter from Option::expect in favor of just taking a hard-coded `&str` argument. This allows this function to move into libcore. Previous code using strings with `expect` will continue to work, but code using this implicitly to transmit task failure will need to unwrap manually with a `match` statement. [breaking-change] Closes #14008
mcpherrinm
pushed a commit
to mcpherrinm/rust
that referenced
this issue
Jun 10, 2014
This commit removes the <M: Any + Send> type parameter from Option::expect in favor of just taking a hard-coded `&str` argument. This allows this function to move into libcore. Previous code using strings with `expect` will continue to work, but code using this implicitly to transmit task failure will need to unwrap manually with a `match` statement. [breaking-change] Closes rust-lang#14008
bors
added a commit
to rust-lang-ci/rust
that referenced
this issue
Feb 13, 2023
Bump package-lock.json
# for free
to join this conversation on GitHub.
Already have an account?
# to comment
In the extraction of the
option
module to libcore, theexpect
method was left to be defined in libstd. It's uncertain whether thisAny + Send
parameterization is necessary. If the method only took&str
it could be defined in libcore.The text was updated successfully, but these errors were encountered: