jinxdash / prettier-plugin-rust

Prettier Rust is an opinionated code formatter that autocorrects bad syntax.
MIT License
178 stars 7 forks source link

Incorrect formatting of `#[generator(yield(u8))]` #25

Closed timongh closed 1 year ago

timongh commented 1 year ago

Input code

#[generator(yield(i32))]
fn nums() {
    yield_!(3);
}

Output code

#[generator({
    yield i32;
})]
fn nums() {
    yield_!(3);
}

Additional context

The macro generator is from the crate next-gen.