Skip to content

Commit

Permalink
Add pattern types to ast
Browse files Browse the repository at this point in the history
  • Loading branch information
oli-obk committed Apr 8, 2024
1 parent 31a4eae commit 7af33b3
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/types.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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}"))
}
}
}
}
Expand Down

0 comments on commit 7af33b3

Please sign in to comment.