@@ -186,23 +186,23 @@ expr_function
186186 | formal_set ':' expr_function[body]
187187 {
188188 state->validateFormals($formal_set);
189- auto me = state->exprs.add<ExprLambda>(state->positions, state->exprs.alloc, CUR_POS, std::move( $formal_set) , $body);
189+ auto me = state->exprs.add<ExprLambda>(state->positions, state->exprs.alloc, CUR_POS, $formal_set, $body);
190190 $$ = me;
191191 SET_DOC_POS(me, @1);
192192 }
193193 | formal_set '@' ID ':' expr_function[body]
194194 {
195195 auto arg = state->symbols.create($ID);
196196 state->validateFormals($formal_set, CUR_POS, arg);
197- auto me = state->exprs.add<ExprLambda>(state->positions, state->exprs.alloc, CUR_POS, arg, std::move( $formal_set) , $body);
197+ auto me = state->exprs.add<ExprLambda>(state->positions, state->exprs.alloc, CUR_POS, arg, $formal_set, $body);
198198 $$ = me;
199199 SET_DOC_POS(me, @1);
200200 }
201201 | ID '@' formal_set ':' expr_function[body]
202202 {
203203 auto arg = state->symbols.create($ID);
204204 state->validateFormals($formal_set, CUR_POS, arg);
205- auto me = state->exprs.add<ExprLambda>(state->positions, state->exprs.alloc, CUR_POS, arg, std::move( $formal_set) , $body);
205+ auto me = state->exprs.add<ExprLambda>(state->positions, state->exprs.alloc, CUR_POS, arg, $formal_set, $body);
206206 $$ = me;
207207 SET_DOC_POS(me, @1);
208208 }
@@ -251,7 +251,7 @@ expr_op
251251 | expr_op OR expr_op { $$ = state->exprs.add<ExprOpOr>(state->at(@2), $1, $3); }
252252 | expr_op IMPL expr_op { $$ = state->exprs.add<ExprOpImpl>(state->at(@2), $1, $3); }
253253 | expr_op UPDATE expr_op { $$ = state->exprs.add<ExprOpUpdate>(state->at(@2), $1, $3); }
254- | expr_op '?' attrpath { $$ = state->exprs.add<ExprOpHasAttr>(state->exprs.alloc, $1, std::move($3) ); }
254+ | expr_op '?' attrpath { $$ = state->exprs.add<ExprOpHasAttr>(state->exprs.alloc, $1, $3 ); }
255255 | expr_op '+' expr_op
256256 { $$ = state->exprs.add<ExprConcatStrings>(state->exprs.alloc, state->at(@2), false, {{state->at(@1), $1}, {state->at(@3), $3}}); }
257257 | expr_op '-' expr_op { $$ = state->exprs.add<ExprCall>(state->at(@2), state->exprs.add<ExprVar>(state->s.sub), {$1, $3}); }
@@ -272,9 +272,9 @@ expr_app
272272
273273expr_select
274274 : expr_simple '.' attrpath
275- { $$ = state->exprs.add<ExprSelect>(state->exprs.alloc, CUR_POS, $1, std::move($3) , nullptr); }
275+ { $$ = state->exprs.add<ExprSelect>(state->exprs.alloc, CUR_POS, $1, $3 , nullptr); }
276276 | expr_simple '.' attrpath OR_KW expr_select
277- { $$ = state->exprs.add<ExprSelect>(state->exprs.alloc, CUR_POS, $1, std::move($3) , $5); $5->warnIfCursedOr(state->symbols, state->positions); }
277+ { $$ = state->exprs.add<ExprSelect>(state->exprs.alloc, CUR_POS, $1, $3 , $5); $5->warnIfCursedOr(state->symbols, state->positions); }
278278 | /* Backwards compatibility: because Nixpkgs has a function named ‘or’,
279279 allow stuff like ‘map or [...]’. This production is problematic (see
280280 https://github.com/NixOS/nix/issues/11118) and will be refactored in the
@@ -304,12 +304,12 @@ expr_simple
304304 $2);
305305 }
306306 | IND_STRING_OPEN ind_string_parts IND_STRING_CLOSE {
307- $$ = state->stripIndentation(CUR_POS, std::move($2) );
307+ $$ = state->stripIndentation(CUR_POS, $2 );
308308 }
309309 | path_start PATH_END
310310 | path_start string_parts_interpolated PATH_END {
311311 $2.insert($2.begin(), {state->at(@1), $1});
312- $$ = state->exprs.add<ExprConcatStrings>(state->exprs.alloc, CUR_POS, false, std::move($2) );
312+ $$ = state->exprs.add<ExprConcatStrings>(state->exprs.alloc, CUR_POS, false, $2 );
313313 }
314314 | SPATH {
315315 std ::string_view path ($1.p + 1, $1.l - 2);
@@ -338,12 +338,12 @@ expr_simple
338338 { $2->pos = CUR_POS; $$ = $2; }
339339 | '{' '}'
340340 { $$ = state->exprs.add<ExprAttrs>(CUR_POS); }
341- | '[' list ']' { $$ = state->exprs.add<ExprList>(state->exprs.alloc, std::move($2) ); }
341+ | '[' list ']' { $$ = state->exprs.add<ExprList>(state->exprs.alloc, $2 ); }
342342 ;
343343
344344string_parts
345345 : STR { $$ = $1; }
346- | string_parts_interpolated { $$ = state->exprs.add<ExprConcatStrings>(state->exprs.alloc, CUR_POS, true, std::move($1) ); }
346+ | string_parts_interpolated { $$ = state->exprs.add<ExprConcatStrings>(state->exprs.alloc, CUR_POS, true, $1 ); }
347347 | { $$ = std::string_view(); }
348348 ;
349349
0 commit comments