Skip to content

__arg variables from async fn desugaring are accessible to the user #60438

Closed
@nikomatsakis

Description

@nikomatsakis

The fixes for #54716 and #60236 introduced __arg variables that, presently, are accessible to the user (playground):

#![feature(async_await)]

async fn foo(_: usize) {
    println!("{}", __arg0);
}

fn main() { }

This code compiles, but it should error.

Metadata

Metadata

Assignees

Labels

A-async-awaitArea: Async & AwaitT-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