File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -3254,7 +3254,7 @@ impl<'c> Translation<'c> {
32543254
32553255 if is_explicit {
32563256 let stmts = self . compute_variable_array_sizes ( ctx, ty. ctype ) ?;
3257- val. prepend_stmts ( stmts) ;
3257+ val = val . prepend_stmts ( stmts) ;
32583258 }
32593259
32603260 // Shuffle Vector "function" builtins will add a cast to the output of the
Original file line number Diff line number Diff line change @@ -136,13 +136,15 @@ impl<T> WithStmts<T> {
136136 self . is_unsafe
137137 }
138138
139- pub fn add_stmt ( & mut self , stmt : Stmt ) {
139+ pub fn add_stmt ( mut self , stmt : Stmt ) -> Self {
140140 self . stmts . push ( stmt) ;
141+ self
141142 }
142143
143- pub fn prepend_stmts ( & mut self , mut stmts : Vec < Stmt > ) {
144+ pub fn prepend_stmts ( mut self , mut stmts : Vec < Stmt > ) -> Self {
144145 stmts. append ( & mut self . stmts ) ;
145146 self . stmts = stmts;
147+ self
146148 }
147149
148150 pub fn is_pure ( & self ) -> bool {
You can’t perform that action at this time.
0 commit comments