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

Can define and use async fn without feature gate on nightly #60069

Closed
Nemo157 opened this issue Apr 18, 2019 · 5 comments
Closed

Can define and use async fn without feature gate on nightly #60069

Nemo157 opened this issue Apr 18, 2019 · 5 comments

Comments

@Nemo157
Copy link
Member

@Nemo157 Nemo157 commented Apr 18, 2019

#![feature(futures_api)]

pub struct Foo;

impl Foo {
    pub async fn foo(&mut self) {
    }
}

fn main() {
    let mut bar = Foo;
    bar.foo();
}

(playground) runs without error, for some reason the async_await feature gate is not required.

(cc @nikomatsakis @cramertj)

@pnkfelix
Copy link
Member

@pnkfelix pnkfelix commented Apr 18, 2019

@Nemo157 Just to be clear: Is there a way to access async fn with no feature gate at all? The provided example is at least opting into #![feature(futures_api)].

If one must use some feature gate to use async fn, then I'd be tempted to prioritize this as P-medium, not P-high.

@pnkfelix
Copy link
Member

@pnkfelix pnkfelix commented Apr 18, 2019

(leaving nominated and unprioritized for now, at least until above question is resolved.)

@pnkfelix
Copy link
Member

@pnkfelix pnkfelix commented Apr 18, 2019

triage: Based on @eddyb's statement that our plan is to stabilize futures "soon", I'll assign this P-high priority for now. Leaving nominated due to the question I posted above.

@Nemo157
Copy link
Member Author

@Nemo157 Nemo157 commented Apr 18, 2019

@pnkfelix not that I could find, but futures_api is currently in FCP for stabilization.

@varkor
Copy link
Member

@varkor varkor commented Apr 18, 2019

Stabilisation issue: #59725

Centril added a commit to Centril/rust that referenced this issue Apr 18, 2019
…ate, r=cramertj

Feature gate async methods

Fixes rust-lang#60069.
Centril added a commit to Centril/rust that referenced this issue Apr 18, 2019
…ate, r=cramertj

Feature gate async methods

Fixes rust-lang#60069.
Centril added a commit to Centril/rust that referenced this issue Apr 18, 2019
…ate, r=cramertj

Feature gate async methods

Fixes rust-lang#60069.
Centril added a commit to Centril/rust that referenced this issue Apr 19, 2019
…ate, r=cramertj

Feature gate async methods

Fixes rust-lang#60069.
Centril added a commit to Centril/rust that referenced this issue Apr 19, 2019
…ate, r=cramertj

Feature gate async methods

Fixes rust-lang#60069.
bors added a commit that referenced this issue Apr 20, 2019
…ertj

Feature gate async methods

Fixes #60069.
@bors bors closed this in #60088 Apr 21, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

4 participants