@@ -118,10 +118,11 @@ pub(crate) struct Generator<'module, 'ast> {
118118 ///
119119 statement_level : Vec < Document < ' ast > > ,
120120
121- /// This will be true if we've generated a statement that is guaranteed to
122- /// throw. This means we can stop code generation for all following statements
121+ /// This will be true if we've generated a `let assert` statement that we know
122+ /// is guaranteed to throw.
123+ /// This means we can stop code generation for all the following statements
123124 /// in the same block!
124- pub statement_always_throws : bool ,
125+ pub let_assert_always_panics : bool ,
125126}
126127
127128impl < ' module , ' a > Generator < ' module , ' a > {
@@ -160,7 +161,7 @@ impl<'module, 'a> Generator<'module, 'a> {
160161 function_position : Position :: Tail ,
161162 scope_position : Position :: Tail ,
162163 statement_level : Vec :: new ( ) ,
163- statement_always_throws : false ,
164+ let_assert_always_panics : false ,
164165 }
165166 }
166167
@@ -773,8 +774,8 @@ impl<'module, 'a> Generator<'module, 'a> {
773774
774775 // If we've generated code for a statement that always throws, we
775776 // can skip code generation for all the following ones.
776- if self . statement_always_throws {
777- self . statement_always_throws = false ;
777+ if self . let_assert_always_panics {
778+ self . let_assert_always_panics = false ;
778779 break ;
779780 }
780781 }
0 commit comments