Skip to content

Support gen syntax (feature gen_blocks) #16156

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

Open
mohe2015 opened this issue Dec 18, 2023 · 1 comment
Open

Support gen syntax (feature gen_blocks) #16156

mohe2015 opened this issue Dec 18, 2023 · 1 comment
Labels
A-parser parser issues C-feature Category: feature request

Comments

@mohe2015
Copy link
Contributor

Hi, it would be nice if the following would parse and show types correctly.

#![feature(gen_blocks)]

pub async gen fn html() {
    let _ = async gen { yield (); };
    yield ();
}

It looks like there already is support for coroutines

#![feature(coroutines)]

pub fn html() {
    let test = || { yield (); };
}

so maybe this is not too hard.

@mohe2015 mohe2015 added the C-feature Category: feature request label Dec 18, 2023
@Veykril Veykril added the A-parser parser issues label Dec 19, 2023
@mohe2015
Copy link
Contributor Author

I'm currently experimenting a bit on this and using this as an opportunity to get to know the code of rust-analyzer

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-parser parser issues C-feature Category: feature request
Projects
None yet
Development

No branches or pull requests

2 participants