ast::ExprKind::Cast(ref expr, ref ty) => {
rewrite_pair(&**expr, &**ty, "", " as ", "", context, width, offset)
}
- // TODO(#848): Handle type ascription; rust tracking issue
- // https://github.com/rust-lang/rust/issues/23416
- ast::ExprKind::Type(_, _) => unimplemented!(),
ast::ExprKind::Index(ref expr, ref index) => {
rewrite_pair(&**expr, &**index, "", "[", "]", context, width, offset)
}
// We do not format these expressions yet, but they should still
// satisfy our width restrictions.
ast::ExprKind::InPlace(..) |
- ast::ExprKind::InlineAsm(..) => {
+ ast::ExprKind::InlineAsm(..) |
+ // TODO(#848): Handle type ascription
+ ast::ExprKind::Type(_, _) |
+ // TODO(#867): Handle try shorthand
+ ast::ExprKind::Try(_) => {
wrap_str(context.snippet(self.span),
context.config.max_width,
width,
offset)
}
- // TODO(#867): Handle type ascription; rust tracking issue
- // https://github.com/rust-lang/rust/issues/31436
- ast::ExprKind::Try(_) => unimplemented!(),
};
result.and_then(|res| recover_comment_removed(res, self.span, context, width, offset))
}