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

Rename IntoFuture::Future to IntoFuture::IntoFuture #94818

Merged
merged 1 commit into from
Mar 12, 2022
Merged

Rename IntoFuture::Future to IntoFuture::IntoFuture #94818

merged 1 commit into from
Mar 12, 2022

Conversation

yoshuawuyts
Copy link
Member

@yoshuawuyts yoshuawuyts commented Mar 10, 2022

Ref: #67644 (comment)

This renames IntoFuture::Future to IntoFuture::IntoFuture. This adds the Into* prefix to the associated type, similar to the IntoIterator::IntoIter associated type. It's my mistake we didn't do so in the first place. This fixes that and brings the two closer together. Thanks!

References

IntoIterator trait def

pub trait IntoIterator {
    type Item;
    type IntoIter: Iterator<Item = Self::Item>;
    fn into_iter(self) -> Self::IntoIter;
}

IntoFuture trait def

pub trait IntoFuture {
    type Output;
    type IntoFuture: Future<Output = Self::Output>; // Prior to this PR: `type Future:`
    fn into_future(self) -> Self::IntoFuture;
}

cc/ @eholk @rust-lang/wg-async

@rust-highfive
Copy link
Collaborator

r? @scottmcm

(rust-highfive has picked a reviewer for you, use r? to override)

@rust-highfive rust-highfive added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Mar 10, 2022
@rustbot rustbot added the T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. label Mar 10, 2022
@yoshuawuyts
Copy link
Member Author

This should probably be labeled T-libs, not T-compiler?

@Dylan-DPC Dylan-DPC added T-libs Relevant to the library team, which will review and decide on the PR/issue. and removed T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. labels Mar 10, 2022
@joshtriplett
Copy link
Member

@bors r+

@bors
Copy link
Contributor

bors commented Mar 11, 2022

📌 Commit 3f2cb6e has been approved by joshtriplett

@bors bors added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Mar 11, 2022
bors added a commit to rust-lang-ci/rust that referenced this pull request Mar 11, 2022
Rollup of 7 pull requests

Successful merges:

 - rust-lang#87618 (Add missing documentation for std::char types)
 - rust-lang#94769 (Collapse blanket and auto-trait impls by default)
 - rust-lang#94798 (`parse_tt` refactorings)
 - rust-lang#94818 (Rename `IntoFuture::Future` to `IntoFuture::IntoFuture`)
 - rust-lang#94827 (CTFE/Miri: detect out-of-bounds pointers in offset_from)
 - rust-lang#94838 (Make float parsing docs more comprehensive)
 - rust-lang#94839 (Suggest using double colon when a struct field type include single colon)

Failed merges:

r? `@ghost`
`@rustbot` modify labels: rollup
@bors bors merged commit fedf70a into rust-lang:master Mar 12, 2022
@rustbot rustbot added this to the 1.61.0 milestone Mar 12, 2022
@yoshuawuyts yoshuawuyts deleted the into-future-associated-type branch March 14, 2022 13:14
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 Relevant to the library team, which will review and decide on the PR/issue.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants