]> git.lizzy.rs Git - rust.git/commit
std: Remove generics from Option::expect
authorAlex Crichton <alex@alexcrichton.com>
Mon, 2 Jun 2014 22:49:42 +0000 (15:49 -0700)
committerAlex Crichton <alex@alexcrichton.com>
Wed, 4 Jun 2014 00:19:56 +0000 (17:19 -0700)
commit896cfcc67fb8d3e53a5dcf138f79909891bf940e
treedf4433cee95ca769c9dc664a63455bcc5f42c166
parentb981add9ee56a2d6dc11aa48f01aac5d0dda9327
std: Remove generics from Option::expect

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
12 files changed:
src/compiletest/runtest.rs
src/libcore/option.rs
src/librustc/metadata/tydecode.rs
src/librustc/middle/trans/reflect.rs
src/libstd/io/timer.rs
src/libstd/lib.rs
src/libstd/option.rs [deleted file]
src/libstd/os.rs
src/libstd/prelude.rs
src/libstd/rt/env.rs
src/libstd/slice.rs
src/libstd/vec.rs