Auto merge of #140951 - compiler-errors:super-fmt, r=ytmimi

Do not remove `super` keyword from `super let`

This is affecting a macro in the standard library:

bc7512ee63/library/core/src/pin.rs (L1945)

I added an exception in 6f6a9a585891d0a2d1114a7a621f35f28f39c0d9, but I'd like to remove it eventually, so opening this in-tree to not block this on the next rustfmt sync.

r? `@calebcartwright` or `@ytmimi`
This commit is contained in:
bors 2025-05-13 06:43:56 +00:00
commit f6b5da71ea

View file

@ -63,6 +63,11 @@ impl Rewrite for ast::Local {
return Err(RewriteError::SkipFormatting);
}
// FIXME(super_let): Implement formatting
if self.super_.is_some() {
return Err(RewriteError::SkipFormatting);
}
let attrs_str = self.attrs.rewrite_result(context, shape)?;
let mut result = if attrs_str.is_empty() {
"let ".to_owned()