Skip to content

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

Closed

Description

@Nemo157
#![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)

Activity

  1. added
    C-bugCategory: This is a bug.
    T-compilerRelevant to the compiler team, which will review and decide on the PR/issue.
    on Apr 18, 2019
  2. pnkfelix commented on Apr 18, 2019

    @pnkfelix
    Contributor

    @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.

  3. pnkfelix commented on Apr 18, 2019

    @pnkfelix
    Contributor

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

  4. pnkfelix commented on Apr 18, 2019

    @pnkfelix
    Contributor

    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.

  5. Nemo157 commented on Apr 18, 2019

    @Nemo157
    ContributorAuthor

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

  6. varkor commented on Apr 18, 2019

    @varkor
    Contributor

    Stabilisation issue: #59725

  7. added 5 commits that reference this issue on Apr 18, 2019
  8. added a commit that references this issue on Apr 20, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

A-async-awaitArea: Async & AwaitC-bugCategory: This is a bug.P-highHigh priorityT-compilerRelevant to the compiler team, which will review and decide on the PR/issue.

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions