forked from rust-lang/rust
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Auto merge of rust-lang#72478 - Dylan-DPC:rollup-vval8du, r=Dylan-DPC
Rollup of 7 pull requests Successful merges: - rust-lang#71289 (Allow using `Self::` in doc) - rust-lang#72375 (Improve E0599 explanation) - rust-lang#72385 (Add some teams to prioritization exclude_labels) - rust-lang#72395 (Allow rust-highfive to label issues it creates.) - rust-lang#72453 (Add flag to open docs: x.py doc --open) - rust-lang#72459 (Add core::future::IntoFuture) - rust-lang#72461 (Clean up E0600 explanation) Failed merges: r? @ghost
- Loading branch information
Showing
15 changed files
with
296 additions
and
11 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
use crate::future::Future; | ||
|
||
/// Conversion into a `Future`. | ||
#[unstable(feature = "into_future", issue = "67644")] | ||
pub trait IntoFuture { | ||
/// The output that the future will produce on completion. | ||
#[unstable(feature = "into_future", issue = "67644")] | ||
type Output; | ||
|
||
/// Which kind of future are we turning this into? | ||
#[unstable(feature = "into_future", issue = "67644")] | ||
type Future: Future<Output = Self::Output>; | ||
|
||
/// Creates a future from a value. | ||
#[unstable(feature = "into_future", issue = "67644")] | ||
fn into_future(self) -> Self::Future; | ||
} | ||
|
||
#[unstable(feature = "into_future", issue = "67644")] | ||
impl<F: Future> IntoFuture for F { | ||
type Output = F::Output; | ||
type Future = F; | ||
|
||
fn into_future(self) -> Self::Future { | ||
self | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.