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

Incorrectly removing async from extern "C" blocks #4360

Closed
pauldorehill opened this issue Jul 31, 2020 · 3 comments
Closed

Incorrectly removing async from extern "C" blocks #4360

pauldorehill opened this issue Jul 31, 2020 · 3 comments
Labels
bug Panic, non-idempotency, invalid code, etc. duplicate fixed

Comments

@pauldorehill
Copy link

pauldorehill commented Jul 31, 2020

Describe the bug

When running rustfmt async is removed from my functions:

To Reproduce
Add any extern block with async, run cargo fmt and the async will be removed:

#[wasm_bindgen(module = "clock")]
extern "C" {
    #[wasm_bindgen]
    async fn strike_thirteen();
}

becomes

#[wasm_bindgen(module = "clock")]
extern "C" {
    #[wasm_bindgen]
    fn strike_thirteen();
}

Expected behavior
My async stays

Meta

  • rustfmt version: 1.4.15-stable
  • From where did you install rustfmt: rustup
  • How do you run rustfmt: cargo fmt (also VSCode + rust-analyzer)
@pauldorehill pauldorehill added the bug Panic, non-idempotency, invalid code, etc. label Jul 31, 2020
@calebcartwright
Copy link
Member

Thank you for the report @pauldorehill. This is a duplicate of #4288 that's already been addressed in source but just hasn't been released yet. Closing accordingly

@pauldorehill
Copy link
Author

Ah apologies... I only searched open

@calebcartwright
Copy link
Member

No worries! We've got quite a lot of unreleased changes on the master branch, and myriad associated issues that have been closed, so it can be trickier than usual to tell sometimes. Thanks again for reaching out!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Panic, non-idempotency, invalid code, etc. duplicate fixed
Projects
None yet
Development

No branches or pull requests

2 participants