Skip to content

Commit b2b14d0

Browse files
committed
Foramt macro on types
1 parent ab81290 commit b2b14d0

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

src/types.rs

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@ use expr::{rewrite_pair, rewrite_tuple, rewrite_unary_prefix, wrap_args_with_par
2323
use items::{format_generics_item_list, generics_shape_from_config};
2424
use lists::{definitive_tactic, itemize_list, write_list, ListFormatting, ListTactic, Separator,
2525
SeparatorPlace, SeparatorTactic};
26+
use macros::{rewrite_macro, MacroPosition};
2627
use rewrite::{Rewrite, RewriteContext};
2728
use shape::Shape;
2829
use utils::{colon_spaces, extra_offset, first_line_width, format_abi, format_mutability,
@@ -726,7 +727,9 @@ impl Rewrite for ast::Ty {
726727
}
727728
ast::TyKind::BareFn(ref bare_fn) => rewrite_bare_fn(bare_fn, self.span, context, shape),
728729
ast::TyKind::Never => Some(String::from("!")),
729-
ast::TyKind::Mac(..) => None,
730+
ast::TyKind::Mac(ref mac) => {
731+
rewrite_macro(mac, None, context, shape, MacroPosition::Expression)
732+
}
730733
ast::TyKind::ImplicitSelf => Some(String::from("")),
731734
ast::TyKind::ImplTrait(ref it) => it.rewrite(context, shape)
732735
.map(|it_str| format!("impl {}", it_str)),

0 commit comments

Comments
 (0)