From 7af33b30768a7ab0df2b285b225233d5fb565c5c Mon Sep 17 00:00:00 2001 From: Oli Scherer Date: Mon, 30 Jan 2023 09:50:16 +0000 Subject: [PATCH] Add pattern types to ast --- src/types.rs | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/types.rs b/src/types.rs index 7f220a456a8..10a87f6e698 100644 --- a/src/types.rs +++ b/src/types.rs @@ -867,6 +867,11 @@ fn rewrite(&self, context: &RewriteContext<'_>, shape: Shape) -> Option self.span, shape, ), + ast::TyKind::Pat(ref ty, ref pat) => { + let ty = ty.rewrite(context, shape)?; + let pat = pat.rewrite(context, shape)?; + Some(format!("{ty} is {pat}")) + } } } }