]> git.lizzy.rs Git - rust.git/blobdiff - compiler/rustc_ast_pretty/src/pprust/state.rs
Teach parser to understand fake anonymous enum syntax
[rust.git] / compiler / rustc_ast_pretty / src / pprust / state.rs
index 6a8064b0e874e84fc7731af56d705b41457d861d..3f9b96a6158a16fb62b38d029068225a3ca8e138 100644 (file)
@@ -1041,6 +1041,9 @@ pub fn print_type(&mut self, ty: &ast::Ty) {
                 }
                 self.pclose();
             }
+            ast::TyKind::AnonEnum(elts) => {
+                self.strsep("|", false, Inconsistent, elts, |s, ty| s.print_type(ty));
+            }
             ast::TyKind::Paren(typ) => {
                 self.popen();
                 self.print_type(typ);