Skip to content

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

Closed
@Nemo157

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)

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