Skip to content

Commit 4923e5a

Browse files
committed
Add sugar for &pin (const|mut) types
1 parent 0323e97 commit 4923e5a

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

src/types.rs

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -827,7 +827,8 @@ impl Rewrite for ast::Ty {
827827

828828
rewrite_unary_prefix(context, prefix, &*mt.ty, shape)
829829
}
830-
ast::TyKind::Ref(ref lifetime, ref mt) => {
830+
ast::TyKind::Ref(ref lifetime, _pinned, ref mt) => {
831+
// FIXME: format pinnedness
831832
let mut_str = format_mutability(mt.mutbl);
832833
let mut_len = mut_str.len();
833834
let mut result = String::with_capacity(128);
@@ -1262,7 +1263,7 @@ pub(crate) fn can_be_overflowed_type(
12621263
) -> bool {
12631264
match ty.kind {
12641265
ast::TyKind::Tup(..) => context.use_block_indent() && len == 1,
1265-
ast::TyKind::Ref(_, ref mutty) | ast::TyKind::Ptr(ref mutty) => {
1266+
ast::TyKind::Ref(_, _, ref mutty) | ast::TyKind::Ptr(ref mutty) => {
12661267
can_be_overflowed_type(context, &*mutty.ty, len)
12671268
}
12681269
_ => false,

0 commit comments

Comments
 (0)