@@ -176,9 +176,6 @@ impl Rewrite for ast::Expr {
176
176
ast:: ExprKind :: Cast ( ref expr, ref ty) => {
177
177
rewrite_pair ( & * * expr, & * * ty, "" , " as " , "" , context, width, offset)
178
178
}
179
- // TODO(#848): Handle type ascription; rust tracking issue
180
- // https://github.com/rust-lang/rust/issues/23416
181
- ast:: ExprKind :: Type ( _, _) => unimplemented ! ( ) ,
182
179
ast:: ExprKind :: Index ( ref expr, ref index) => {
183
180
rewrite_pair ( & * * expr, & * * index, "" , "[" , "]" , context, width, offset)
184
181
}
@@ -211,15 +208,16 @@ impl Rewrite for ast::Expr {
211
208
// We do not format these expressions yet, but they should still
212
209
// satisfy our width restrictions.
213
210
ast:: ExprKind :: InPlace ( ..) |
214
- ast:: ExprKind :: InlineAsm ( ..) => {
211
+ ast:: ExprKind :: InlineAsm ( ..) |
212
+ // TODO(#848): Handle type ascription
213
+ ast:: ExprKind :: Type ( _, _) |
214
+ // TODO(#867): Handle try shorthand
215
+ ast:: ExprKind :: Try ( _) => {
215
216
wrap_str ( context. snippet ( self . span ) ,
216
217
context. config . max_width ,
217
218
width,
218
219
offset)
219
220
}
220
- // TODO(#867): Handle type ascription; rust tracking issue
221
- // https://github.com/rust-lang/rust/issues/31436
222
- ast:: ExprKind :: Try ( _) => unimplemented ! ( ) ,
223
221
} ;
224
222
result. and_then ( |res| recover_comment_removed ( res, self . span , context, width, offset) )
225
223
}
0 commit comments