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 · Fixed by #60088
Closed

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

Nemo157 opened this issue Apr 18, 2019 · 5 comments · Fixed by #60088
Assignees
Labels
A-async-await Area: Async & Await C-bug Category: This is a bug. P-high High priority T-compiler Relevant to the compiler team, which will review and decide on the PR/issue.

Comments

@Nemo157
Copy link
Member

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)

@jonas-schievink jonas-schievink added A-async-await Area: Async & Await C-bug Category: This is a bug. I-nominated T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. labels Apr 18, 2019
@pnkfelix
Copy link
Member

@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

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

@pnkfelix
Copy link
Member

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 High priority label Apr 18, 2019
@Nemo157
Copy link
Member Author

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 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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-async-await Area: Async & Await C-bug Category: This is a bug. P-high High priority T-compiler Relevant to the compiler team, which will review and decide on the PR/issue.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants