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

Comments

Projects
None yet
4 participants
@Nemo157
Copy link
Contributor

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

This comment has been minimized.

Copy link
Member

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

This comment has been minimized.

Copy link
Member

commented Apr 18, 2019

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

@pnkfelix

This comment has been minimized.

Copy link
Member

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.

@pnkfelix pnkfelix added the P-high label Apr 18, 2019

@Nemo157

This comment has been minimized.

Copy link
Contributor Author

commented Apr 18, 2019

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

@varkor

This comment has been minimized.

Copy link
Member

commented Apr 18, 2019

Stabilisation issue: #59725

Centril added a commit to Centril/rust that referenced this issue Apr 18, 2019

Rollup merge of rust-lang#60088 - varkor:async_await-method-feature-g…
…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

Rollup merge of rust-lang#60088 - varkor:async_await-method-feature-g…
…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

Rollup merge of rust-lang#60088 - varkor:async_await-method-feature-g…
…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

Rollup merge of rust-lang#60088 - varkor:async_await-method-feature-g…
…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

Rollup merge of rust-lang#60088 - varkor:async_await-method-feature-g…
…ate, r=cramertj

Feature gate async methods

Fixes rust-lang#60069.

bors added a commit that referenced this issue Apr 20, 2019

Auto merge of #60088 - varkor:async_await-method-feature-gate, r=cram…
…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
You can’t perform that action at this time.