about summary refs log tree commit diff
path: root/src/tools/rustfmt
diff options
context:
space:
mode:
authorFrank King <frankking1729@gmail.com>2024-01-04 21:53:06 +0800
committerFrank King <frankking1729@gmail.com>2024-02-12 12:47:23 +0800
commit879a1e571305a0fb35ef6cc4297f9230fca95be5 (patch)
tree232e06c6b3eefcc81f10f825a430f04a7325c498 /src/tools/rustfmt
parent084ce5bdb5f7dc1c725f6770a8de281165ba3b0a (diff)
Lower anonymous structs or unions to HIR
Diffstat (limited to 'src/tools/rustfmt')
-rw-r--r--src/tools/rustfmt/src/types.rs4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/tools/rustfmt/src/types.rs b/src/tools/rustfmt/src/types.rs
index cd2582e66be..aaef80f4aef 100644
--- a/src/tools/rustfmt/src/types.rs
+++ b/src/tools/rustfmt/src/types.rs
@@ -806,8 +806,8 @@ impl Rewrite for ast::Ty {
             ast::TyKind::Tup(ref items) => {
                 rewrite_tuple(context, items.iter(), self.span, shape, items.len() == 1)
             }
-            ast::TyKind::AnonStruct(_) => Some(context.snippet(self.span).to_owned()),
-            ast::TyKind::AnonUnion(_) => Some(context.snippet(self.span).to_owned()),
+            ast::TyKind::AnonStruct(..) => Some(context.snippet(self.span).to_owned()),
+            ast::TyKind::AnonUnion(..) => Some(context.snippet(self.span).to_owned()),
             ast::TyKind::Path(ref q_self, ref path) => {
                 rewrite_path(context, PathContext::Type, q_self, path, shape)
             }