1
Fork 0

Add sugar for &pin (const|mut) types

This commit is contained in:
Eric Holk 2024-09-20 12:09:18 -07:00
parent 7caad69253
commit ae698f8199
No known key found for this signature in database
GPG key ID: F1A772BB658A63E1
23 changed files with 284 additions and 63 deletions

View file

@ -1163,6 +1163,12 @@ impl<'a> State<'a> {
self.print_opt_lifetime(lifetime);
self.print_mt(mt, false);
}
ast::TyKind::PinnedRef(lifetime, mt) => {
self.word("&");
self.print_opt_lifetime(lifetime);
self.word("pin ");
self.print_mt(mt, true);
}
ast::TyKind::Never => {
self.word("!");
}