@@ -112,16 +112,7 @@ enum BlockFrame {
112
112
/// Evaluation is currently within the tail expression of a block.
113
113
///
114
114
/// Example: `{ STMT_1; STMT_2; EXPR }`
115
- TailExpr {
116
- /// If true, then the surrounding context of the block ignores
117
- /// the result of evaluating the block's tail expression.
118
- ///
119
- /// Example: `let _ = { STMT_1; EXPR };`
120
- tail_result_is_ignored : bool ,
121
-
122
- /// `Span` of the tail expression.
123
- span : Span ,
124
- } ,
115
+ TailExpr { info : BlockTailInfo } ,
125
116
126
117
/// Generic mark meaning that the block occurred as a subexpression
127
118
/// where the result might be used.
@@ -277,9 +268,7 @@ impl BlockContext {
277
268
match bf {
278
269
BlockFrame :: SubExpr => continue ,
279
270
BlockFrame :: Statement { .. } => break ,
280
- & BlockFrame :: TailExpr { tail_result_is_ignored, span } => {
281
- return Some ( BlockTailInfo { tail_result_is_ignored, span } ) ;
282
- }
271
+ & BlockFrame :: TailExpr { info } => return Some ( info) ,
283
272
}
284
273
}
285
274
@@ -302,9 +291,9 @@ impl BlockContext {
302
291
303
292
// otherwise: use accumulated is_ignored state.
304
293
Some (
305
- BlockFrame :: TailExpr { tail_result_is_ignored : ignored , .. }
306
- | BlockFrame :: Statement { ignores_expr_result : ignored } ,
307
- ) => * ignored ,
294
+ BlockFrame :: TailExpr { info : BlockTailInfo { tail_result_is_ignored : ign , .. } }
295
+ | BlockFrame :: Statement { ignores_expr_result : ign } ,
296
+ ) => * ign ,
308
297
}
309
298
}
310
299
}
0 commit comments