We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
In the following example, rustfmt increases the indentation of the line with }); by one level each time it is run:
});
macro_rules! pwm_timer_init { ($tim:expr) => {{ let tim = $tim; #[rustfmt::skip] tim.ccmr1_output().write(|w| { w .oc1pe().enabled() .oc1m().pwm_mode1() .oc2pe().enabled() .oc2m().pwm_mode1() }); }}; }
This is also visible in the nightly version of the playground, though I found it with rustfmt 1.5.1-stable (4b91a6e 2022-08-08).
rustfmt 1.5.1-stable (4b91a6e 2022-08-08)
The text was updated successfully, but these errors were encountered:
looking into this a little more, and I think this issue might have to do with the #[rustfmt::skip] attribute.
#[rustfmt::skip]
Input
macro_rules! pwm_timer_init { ($tim:expr) => {{ let tim = $tim; tim.ccmr1_output().write(|w| { w .oc1pe().enabled() .oc1m().pwm_mode1() .oc2pe().enabled() .oc2m().pwm_mode1() }); }}; }
Note: the }); is not indented in the following output after formatting with rustfmt 1.5.1-nightly (ef911542 2022-09-19)
rustfmt 1.5.1-nightly (ef911542 2022-09-19)
Output
macro_rules! pwm_timer_init { ($tim:expr) => {{ let tim = $tim; tim.ccmr1_output().write(|w| { w.oc1pe() .enabled() .oc1m() .pwm_mode1() .oc2pe() .enabled() .oc2m() .pwm_mode1() }); }}; }
Sorry, something went wrong.
Similar issue (#5489), but might not be the same underlying problem.
No branches or pull requests
In the following example, rustfmt increases the indentation of the line with
});
by one level each time it is run:This is also visible in the nightly version of the playground, though I found it with
rustfmt 1.5.1-stable (4b91a6e 2022-08-08)
.The text was updated successfully, but these errors were encountered: