diff options
| author | Oli Scherer <git-spam-no-reply9815368754983@oli-obk.de> | 2023-01-30 09:50:16 +0000 |
|---|---|---|
| committer | Oli Scherer <git-spam-no-reply9815368754983@oli-obk.de> | 2024-04-08 11:54:22 +0000 |
| commit | fc27a91880f54bbf9c66fa545d508199e2c441bb (patch) | |
| tree | bb5cc6c34bee8ec4ca6be06bcf5fc491bff3ee75 /src/tools/rustfmt | |
| parent | 0e5f5207881066973486e6a480fa46cfa22947e9 (diff) | |
| download | rust-fc27a91880f54bbf9c66fa545d508199e2c441bb.tar.gz rust-fc27a91880f54bbf9c66fa545d508199e2c441bb.zip | |
Add pattern types to ast
Diffstat (limited to 'src/tools/rustfmt')
| -rw-r--r-- | src/tools/rustfmt/src/types.rs | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/tools/rustfmt/src/types.rs b/src/tools/rustfmt/src/types.rs index 7f220a456a8..10a87f6e698 100644 --- a/src/tools/rustfmt/src/types.rs +++ b/src/tools/rustfmt/src/types.rs @@ -867,6 +867,11 @@ impl Rewrite for ast::Ty { 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}")) + } } } } |
