@@ -112,16 +112,7 @@ enum BlockFrame {
112112 /// Evaluation is currently within the tail expression of a block.
113113 ///
114114 /// 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 } ,
125116
126117 /// Generic mark meaning that the block occurred as a subexpression
127118 /// where the result might be used.
@@ -277,9 +268,7 @@ impl BlockContext {
277268 match bf {
278269 BlockFrame :: SubExpr => continue ,
279270 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) ,
283272 }
284273 }
285274
@@ -302,9 +291,9 @@ impl BlockContext {
302291
303292 // otherwise: use accumulated is_ignored state.
304293 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 ,
308297 }
309298 }
310299}
0 commit comments