aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorbors[bot] <26634292+bors[bot]@users.noreply.github.com>2021-04-25 15:37:51 +0000
committerGitHub <noreply@github.com>2021-04-25 15:37:51 +0000
commite5aedbbb241220f7ffb89d96a885dd6e44038259 (patch)
tree35fc378dbd5189d27e4f1607b1753c7226ea8f52 /gcc
parent041003da86f895ba5b00ae4a683996131d0441bf (diff)
parent8ee80abd2fb2bb6870c539a7e407b9944e1c2c46 (diff)
downloadgcc-e5aedbbb241220f7ffb89d96a885dd6e44038259.zip
gcc-e5aedbbb241220f7ffb89d96a885dd6e44038259.tar.gz
gcc-e5aedbbb241220f7ffb89d96a885dd6e44038259.tar.bz2
Merge #388
388: Assign outer_attrs in IfLetExpr constructor r=philberty a=CohenArthur Closes #360 This fixes IfLetExpr's behavior and removes the previous unused warning as well Co-authored-by: CohenArthur <arthur.cohen@epita.fr>
Diffstat (limited to 'gcc')
-rw-r--r--gcc/rust/ast/rust-expr.h6
1 files changed, 3 insertions, 3 deletions
diff --git a/gcc/rust/ast/rust-expr.h b/gcc/rust/ast/rust-expr.h
index eb56b65..4bb3557 100644
--- a/gcc/rust/ast/rust-expr.h
+++ b/gcc/rust/ast/rust-expr.h
@@ -4374,11 +4374,11 @@ public:
IfLetExpr (std::vector<std::unique_ptr<Pattern> > match_arm_patterns,
std::unique_ptr<Expr> value, std::unique_ptr<BlockExpr> if_block,
- std::vector<Attribute> /* outer_attrs */, Location locus)
- : match_arm_patterns (std::move (match_arm_patterns)),
+ std::vector<Attribute> outer_attrs, Location locus)
+ : outer_attrs (std::move (outer_attrs)),
+ match_arm_patterns (std::move (match_arm_patterns)),
value (std::move (value)), if_block (std::move (if_block)), locus (locus)
{}
- // outer attributes not allowed on if let exprs either
// copy constructor with clone
IfLetExpr (IfLetExpr const &other)